Skip to content

Commit

Permalink
thread.h: guard variables defined in host
Browse files Browse the repository at this point in the history
This allows linking the file outside UltraGrid.
  • Loading branch information
MartinPulec committed Nov 13, 2023
1 parent ddaba11 commit deab6ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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
Expand Down

0 comments on commit deab6ee

Please sign in to comment.