summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--util.h10
2 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 877dc55..a5ec278 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,15 @@ INSTALL ?= install
DESTDIR ?=
PREFIX ?= /usr
-LOCAL_CPPFLAGS := -D_DEFAULT_SOURCE -D_GNU_SOURCE -DBFS_VERSION=\"$(VERSION)\"
+LOCAL_CPPFLAGS := \
+ -D_POSIX_C_SOURCE=200809L \
+ -D_DEFAULT_SOURCE \
+ -D_BSD_SOURCE \
+ -D_GNU_SOURCE \
+ -D_ATFILE_SOURCE \
+ -D__EXTENSIONS__ \
+ -DBFS_VERSION=\"$(VERSION)\"
+
LOCAL_CFLAGS := -std=c99
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)
diff --git a/util.h b/util.h
index e814f23..f65e9f5 100644
--- a/util.h
+++ b/util.h
@@ -13,6 +13,8 @@
#define BFS_UTIL_H
#include <dirent.h>
+#include <fcntl.h>
+#include <fnmatch.h>
#include <stdbool.h>
#include <sys/stat.h>
@@ -24,6 +26,14 @@
# define st_mtim st_mtimespec
#endif
+#if !defined(FNM_CASEFOLD) && defined(FNM_IGNORECASE)
+# define FNM_CASEFOLD FNM_IGNORECASE
+#endif
+
+#ifndef O_DIRECTORY
+# define O_DIRECTORY 0
+#endif
+
#ifndef S_ISDOOR
# define S_ISDOOR(mode) false
#endif