summaryrefslogtreecommitdiffhomepage
path: root/lib/fs.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-03-15 00:24:20 +0100
committerJo-Philipp Wich <jo@mein.io>2022-03-15 23:15:11 +0100
commitd13c32081d6a51289585264deabf5cafed379706 (patch)
tree48771882b68da8d0955bb0e97a180cbd2110cb46 /lib/fs.c
parent33397a399c608830614d8061fe13db7ebabd0bf7 (diff)
fs: avoid Linux specific sys/sysmacros.h include on OS X
It should be enough to include `sys/types.h` to obtain `major()` and `minor()` definitions on OS X, so avoid including the the Linux specific `sys/sysmacros.h` header in this case. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib/fs.c')
-rw-r--r--lib/fs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 6c6aa2a..bae5d28 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -21,13 +21,16 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/sysmacros.h>
#include <grp.h>
#include <pwd.h>
#include <glob.h>
#include <fnmatch.h>
#include <limits.h>
+#ifndef __APPLE__
+#include <sys/sysmacros.h> /* major(), minor() */
+#endif
+
#include "ucode/module.h"
#define err_return(err) do { last_error = err; return NULL; } while(0)