Permalink
Browse files

Merge pull request #10185 from jbeich/bsd

Minor BSD fixes
  • Loading branch information...
hrydgard committed Nov 26, 2017
2 parents 273dab9 + 206d287 commit dc3363e88544e717f750fdda1fc0a4be648e8031
Showing with 10 additions and 3 deletions.
  1. +8 −3 Common/FileUtil.cpp
  2. +2 −0 Core/Reporting.cpp
View
@@ -42,9 +42,8 @@
#include <stdlib.h>
#endif
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
#include <sys/sysctl.h> // KERN_PROC_PATHNAME
#include <unistd.h> // getpid
#endif
#if defined(__APPLE__)
@@ -767,9 +766,15 @@ const std::string &GetExeDirectory()
#elif defined(KERN_PROC_PATHNAME)
int mib[4] = {
CTL_KERN,
#if defined(__NetBSD__)
KERN_PROC_ARGS,
-1,
KERN_PROC_PATHNAME,
#else
KERN_PROC,
KERN_PROC_PATHNAME,
getpid()
-1,
#endif
};
size_t sz = program_path_size;
View
@@ -269,6 +269,8 @@ namespace Reporting
return "DragonFly";
#elif defined(__FreeBSD__)
return "FreeBSD";
#elif defined(__FreeBSD_kernel__) && defined(__GLIBC__)
return "GNU/kFreeBSD";
#elif defined(__NetBSD__)
return "NetBSD";
#elif defined(__OpenBSD__)

0 comments on commit dc3363e

Please sign in to comment.