Permalink
Browse files

Common: implement GetExeDirectory on NetBSD

  • Loading branch information...
jbeich committed May 25, 2015
1 parent 87942dd commit 7a16cff6de02e27272b2fc7db1fa23fe77efcf4a
Showing with 8 additions and 3 deletions.
  1. +8 −3 Common/FileUtil.cpp
@@ -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;

0 comments on commit 7a16cff

Please sign in to comment.