From: Mike Yuan Date: Wed, 25 Jun 2025 11:04:47 +0000 (+0200) Subject: Revert "fs-util: include fcntl.h in fs-util.h" X-Git-Tag: v258-rc1~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c3da8cbf9e398578dfc26628a4bc323abf55415;p=thirdparty%2Fsystemd.git Revert "fs-util: include fcntl.h in fs-util.h" 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. --- diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index 12ba2dfe2c6..b04fe71f037 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -1,8 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include /* IWYU pragma: export */ - #include "forward.h" #include "lock-util.h"