From 7c3da8cbf9e398578dfc26628a4bc323abf55415 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 25 Jun 2025 13:04:47 +0200 Subject: [PATCH] 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. --- src/basic/fs-util.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index 12ba2dfe2c..b04fe71f03 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"