Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Commit

Permalink
add missing || defined(__DragonFly__)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoechtrager committed Jul 19, 2015
1 parent e1524ae commit 229e3ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cctools/ld64/src/3rd/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void __assert_rtn(const char *func, const char *file, int line, const char *msg)

int _NSGetExecutablePath(char *epath, unsigned int *size)
{
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__DragonFly__)
int mib[4];
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
Expand Down
2 changes: 1 addition & 1 deletion cctools/libstuff/emulated.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

int _NSGetExecutablePath(char *epath, unsigned int *size)
{
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__DragonFly__)
int mib[4];
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
Expand Down
2 changes: 1 addition & 1 deletion usage_examples/ios_toolchain/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ char *get_executable_path(char *epath, size_t buflen)
#ifdef __APPLE__
unsigned int l = buflen;
if (_NSGetExecutablePath(epath, &l) != 0) return NULL;
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__DragonFly__)
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
size_t l = buflen;
if (sysctl(mib, 4, epath, &l, NULL, 0) != 0) return NULL;
Expand Down

0 comments on commit 229e3ce

Please sign in to comment.