aboutsummaryrefslogtreecommitdiff
path: root/contrib/ofed
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-03-04 22:37:25 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-03-04 22:37:25 +0000
commit1465ae5d7f2e96389a77ecbf9f7ce3869a7fdc09 (patch)
treea0e33f214262f1523d1b2a9028141bc7c4d1e484 /contrib/ofed
parent49e66890985c1e1f6c67925cf9b35260a0296296 (diff)
downloadsrc-1465ae5d7f2e96389a77ecbf9f7ce3869a7fdc09.tar.gz
src-1465ae5d7f2e96389a77ecbf9f7ce3869a7fdc09.zip
Fix missing symbol program_invocation_short_name.
This fixes runtime when logging is enabled. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=296401
Diffstat (limited to 'contrib/ofed')
-rw-r--r--contrib/ofed/libsdp/src/port.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/ofed/libsdp/src/port.c b/contrib/ofed/libsdp/src/port.c
index 26bcf7cf30e3..ff428394ab33 100644
--- a/contrib/ofed/libsdp/src/port.c
+++ b/contrib/ofed/libsdp/src/port.c
@@ -40,6 +40,9 @@
#define FASYNC 0
#include <libgen.h>
#endif
+#ifdef __FreeBSD__
+#include <libgen.h>
+#endif
#include <unistd.h>
#include <errno.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
* 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 =
"[short_progname]";
#else
@@ -2583,6 +2586,10 @@ void __sdp_init(void)
program_invocation_short_name = basename(args_info.dla_argv[0]);
}
#endif
+#ifdef __FreeBSD__
+ program_invocation_short_name = (char *)getprogname();
+ program_invocation_name = program_invocation_short_name;
+#endif
if (getenv("SIMPLE_LIBSDP") != NULL) {
simple_sdp_library = 1;