From deab6eecf93c0d00efd811ca551d7ced16a3dab6 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 13 Nov 2023 10:25:19 +0100 Subject: [PATCH] thread.h: guard variables defined in host This allows linking the file outside UltraGrid. --- src/utils/thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/thread.c b/src/utils/thread.c index 5bf668691..e4a917324 100644 --- a/src/utils/thread.c +++ b/src/utils/thread.c @@ -55,6 +55,7 @@ #if ! defined WIN32 || defined HAVE_SETTHREADDESCRIPTION static inline char *get_argv_program_name(void) { +#ifdef HAVE_CONFIG_H if (uv_argv != NULL && uv_argv[0] != NULL) { char *prog_name = (char *) malloc(strlen(uv_argv[0]) + 2); strcpy(prog_name, uv_argv[0]); @@ -63,6 +64,7 @@ static inline char *get_argv_program_name(void) { strcat(prog_name, "-"); return prog_name; } +#endif // defined HAVE_CONFIG_H return strdup("uv-"); } #endif