diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-03-15 00:24:20 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-03-15 23:15:11 +0100 |
commit | d13c32081d6a51289585264deabf5cafed379706 (patch) | |
tree | 48771882b68da8d0955bb0e97a180cbd2110cb46 /lib/fs.c | |
parent | 33397a399c608830614d8061fe13db7ebabd0bf7 (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |