]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "fs-util: include fcntl.h in fs-util.h"
authorMike Yuan <me@yhndnzj.com>
Wed, 25 Jun 2025 11:04:47 +0000 (13:04 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 25 Jun 2025 15:46:20 +0000 (00:46 +0900)
This reverts commit 4d0fe93cbaf01fcc2a61f51bb36cd4b07394bab8.

I'm not convinced by the reasoning here. The practice of
forward declarations should be confined in headers only,
and any actual invocation of functions in source files
needs to include the original header. strv_split_full()
for instance takes ExtractFlags, and callers will need
to include extract-word.h to get the value definitions.

Now, indeed some -util headers export the most relevant
system header too, notably pidfd-util. But fs-util doesn't
seem to be coupled with any specific header, hence I'm
skeptical about such inclusion.

src/basic/fs-util.h

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