chiark / gitweb /
core: rework how we flush incoming traffic when a socket unit goes down
[elogind.git] / src / basic / fs-util.h
index 1f940a4227701f01797ebe5db8fb601c37c04ad4..2000b38a96738230e43df68dca4c802750ee8117 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 #pragma once
 
 /***
@@ -23,6 +21,8 @@
 
 #include <fcntl.h>
 #include <limits.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <sys/inotify.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -51,7 +51,12 @@ int fchmod_umask(int fd, mode_t mode);
 
 int fd_warn_permissions(const char *path, int fd);
 
+#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
+
 
 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
 int touch(const char *path);