aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2017-03-13 02:32:06 +0000
committerMartin Pärtel <martin.partel@gmail.com>2017-03-13 02:32:06 +0000
commit3f10f219d18e42967c67349f6e5f4340769e524d (patch)
tree481489bda9844529e529c42e56a49a808eac970d /src
parentfcc29967b0c6cc65cd016f2ff6e36b738fb959a8 (diff)
downloadbindfs-3f10f219d18e42967c67349f6e5f4340769e524d.tar.gz
Fixed compiling on FreeBSD.
Fixes #51. Test suite changes will come in a later commit.
Diffstat (limited to 'src')
-rw-r--r--src/bindfs.c3
-rw-r--r--src/rate_limiter.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/bindfs.c b/src/bindfs.c
index af3763c..cf681dd 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -34,6 +34,9 @@
/* For >= 500 for pread/pwrite and readdir_r; >= 700 for utimensat */
#define _XOPEN_SOURCE 700
+/* For flock() on FreeBSD. It otherwise gets hidden by _XOPEN_SOURCE */
+#define __BSD_VISIBLE 1
+
/* For stat() nanosecond precision and lutimes() */
#define _BSD_SOURCE
/* The new non-deprecated version of _BSD_SOURCE */
diff --git a/src/rate_limiter.c b/src/rate_limiter.c
index d1c701a..68763c7 100644
--- a/src/rate_limiter.c
+++ b/src/rate_limiter.c
@@ -17,7 +17,7 @@
along with bindfs. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _POSIX_C_SOURCE 199309L /* for nanosleep() */
+#define _XOPEN_SOURCE 700 /* for gettimeofday() on freebsd, and for nanosleep() */
#include "rate_limiter.h"
#include <assert.h>