chiark / gitweb /
sd-daemon: fix sd_is_mq for non-mq fds
[elogind.git] / src / basic / util.h
index 3b956b8569cf124f93076f2bd091b808da2475c5..42117ed31efc8b85e42732df4ed5cec7f8941957 100644 (file)
@@ -41,6 +41,7 @@
 #include <mntent.h>
 #include <sys/inotify.h>
 #include <sys/statfs.h>
+#include <sys/sysmacros.h>
 
 #include "macro.h"
 #include "missing.h"
@@ -890,7 +891,11 @@ union inotify_event_buffer {
         uint8_t raw[INOTIFY_EVENT_MAX];
 };
 
-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
+#ifdef __GLIBC__
+ #define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
+#else
+ #define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
+#endif
 
 // UNNEEDED int ptsname_malloc(int fd, char **ret);