Fix missing symbol program_invocation_short_name.
This fixes runtime when logging is enabled. Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
49e6689098
commit
1465ae5d7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296401
@ -40,6 +40,9 @@
|
|||||||
#define FASYNC 0
|
#define FASYNC 0
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <libgen.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -217,7 +220,7 @@ volatile static int init_status = 0; /* 0: idle, 1:during, 2:ready */
|
|||||||
|
|
||||||
/* glibc provides these symbols - for Solaris builds we fake them
|
/* glibc provides these symbols - for Solaris builds we fake them
|
||||||
* until _init is called, at which point we quiz libdl.. */
|
* until _init is called, at which point we quiz libdl.. */
|
||||||
#ifdef SOLARIS_BUILD
|
#if defined(SOLARIS_BUILD) || defined(__FreeBSD__)
|
||||||
char *program_invocation_name = "[progname]", *program_invocation_short_name =
|
char *program_invocation_name = "[progname]", *program_invocation_short_name =
|
||||||
"[short_progname]";
|
"[short_progname]";
|
||||||
#else
|
#else
|
||||||
@ -2583,6 +2586,10 @@ void __sdp_init(void)
|
|||||||
program_invocation_short_name = basename(args_info.dla_argv[0]);
|
program_invocation_short_name = basename(args_info.dla_argv[0]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
program_invocation_short_name = (char *)getprogname();
|
||||||
|
program_invocation_name = program_invocation_short_name;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (getenv("SIMPLE_LIBSDP") != NULL) {
|
if (getenv("SIMPLE_LIBSDP") != NULL) {
|
||||||
simple_sdp_library = 1;
|
simple_sdp_library = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user