]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fs-util: include fcntl.h in fs-util.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 21 Jun 2025 16:34:36 +0000 (01:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 24 Jun 2025 18:59:25 +0000 (03:59 +0900)
fs-util.h provides access_nofollow() but it did not include neither
fcntl.h nor unistd.h, which define F_OK and friends. Hence we cannot use
the function without including one of the headers. Let's include fcntl.h
in fs-util.h, then we can use the function by simply including fs-util.h.

src/basic/fs-util.h

index 1150f914be3e6b3fb21313e5b3b7b12740e57cd3..d972b6d13259882cb2351c0829495bb9191af8d8 100644 (file)
@@ -1,6 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <fcntl.h>              /* IWYU pragma: export */
+
 #include "forward.h"
 #include "lock-util.h"