summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/fs-util.h16
-rw-r--r--src/basic/util.h12
-rw-r--r--src/core/cgroup.c1
-rw-r--r--src/core/path.c1
-rw-r--r--src/journal/sd-journal.c1
-rw-r--r--src/libsystemd/sd-network/sd-network.c5
6 files changed, 21 insertions, 15 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 0e1906ba3f..b94873e65b 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -21,9 +21,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/types.h>
#include <fcntl.h>
+#include <sys/inotify.h>
+#include <sys/types.h>
#include <unistd.h>
+#include <limits.h>
#include "time-util.h"
@@ -58,3 +60,15 @@ int mknod_atomic(const char *path, mode_t mode, dev_t dev);
int mkfifo_atomic(const char *path, mode_t mode);
int get_files_in_directory(const char *path, char ***list);
+
+#define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1)
+
+#define FOREACH_INOTIFY_EVENT(e, buffer, sz) \
+ for ((e) = &buffer.ev; \
+ (uint8_t*) (e) < (uint8_t*) (buffer.raw) + (sz); \
+ (e) = (struct inotify_event*) ((uint8_t*) (e) + sizeof(struct inotify_event) + (e)->len))
+
+union inotify_event_buffer {
+ struct inotify_event ev;
+ uint8_t raw[INOTIFY_EVENT_MAX];
+};
diff --git a/src/basic/util.h b/src/basic/util.h
index 2c2cb36190..a8fba372d1 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -181,16 +181,4 @@ uint64_t physical_memory(void);
int update_reboot_param_file(const char *param);
-#define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1)
-
-#define FOREACH_INOTIFY_EVENT(e, buffer, sz) \
- for ((e) = &buffer.ev; \
- (uint8_t*) (e) < (uint8_t*) (buffer.raw) + (sz); \
- (e) = (struct inotify_event*) ((uint8_t*) (e) + sizeof(struct inotify_event) + (e)->len))
-
-union inotify_event_buffer {
- struct inotify_event ev;
- uint8_t raw[INOTIFY_EVENT_MAX];
-};
-
int version(void);
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 70f6d4af0f..bed01fde21 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -27,6 +27,7 @@
#include "cgroup.h"
#include "fd-util.h"
#include "fileio.h"
+#include "fs-util.h"
#include "parse-util.h"
#include "path-util.h"
#include "process-util.h"
diff --git a/src/core/path.c b/src/core/path.c
index 9c5309a58a..35e1753583 100644
--- a/src/core/path.c
+++ b/src/core/path.c
@@ -28,6 +28,7 @@
#include "bus-util.h"
#include "dbus-path.h"
#include "fd-util.h"
+#include "fs-util.h"
#include "glob-util.h"
#include "macro.h"
#include "mkdir.h"
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 6eda5162c7..043087485b 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -37,6 +37,7 @@
#include "fd-util.h"
#include "fileio.h"
#include "formats-util.h"
+#include "fs-util.h"
#include "hashmap.h"
#include "hostname-util.h"
#include "io-util.h"
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
index 2eaa2626f7..efbceba83d 100644
--- a/src/libsystemd/sd-network/sd-network.c
+++ b/src/libsystemd/sd-network/sd-network.c
@@ -28,13 +28,14 @@
#include "sd-network.h"
#include "alloc-util.h"
+#include "fd-util.h"
#include "fileio.h"
+#include "fs-util.h"
#include "macro.h"
+#include "parse-util.h"
#include "string-util.h"
#include "strv.h"
#include "util.h"
-#include "fd-util.h"
-#include "parse-util.h"
_public_ int sd_network_get_operational_state(char **state) {
_cleanup_free_ char *s = NULL;