Skip to content

Commit

Permalink
Attempt to fix build on Tiger
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Feb 4, 2017
1 parent 70495b1 commit 70a2ae0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/pextlib1.0/Pextlib.c
Expand Up @@ -36,14 +36,16 @@
#include <config.h>
#endif

/* required for strdup(3) on Linux and OS X */
#ifndef __APPLE__
/* required for strdup(3) on Linux */
#define _XOPEN_SOURCE 600L
/* required for clearenv(3)/setenv(3)/unsetenv(3) on Linux */
#define _BSD_SOURCE
/* required for clearenv(3)/setenv(3)/unsetenv(3) on OS X */
#define _DARWIN_C_SOURCE
/* required for vasprintf(3) on Linux */
#define _GNU_SOURCE
#endif
/* required for clearenv(3)/setenv(3)/unsetenv(3) on OS X */
#define _DARWIN_C_SOURCE

#include <sys/resource.h>
#include <sys/types.h>
Expand Down
7 changes: 4 additions & 3 deletions src/pextlib1.0/adv-flock.c
Expand Up @@ -33,10 +33,11 @@
#include <config.h>
#endif

/* needed to get struct sigaction on some platforms */
#ifndef __APPLE__
/* needed to get struct sigaction on some platforms, but
hides flock on OS X */
#define _XOPEN_SOURCE 500L
/* the above hides flock on OS X without _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
#endif

#if HAVE_SYS_FILE_H
#include <sys/file.h>
Expand Down

0 comments on commit 70a2ae0

Please sign in to comment.