From: Daan De Meyer Date: Tue, 29 Apr 2025 13:46:48 +0000 (+0200) Subject: basic: Remove assertions from missing_fs.h X-Git-Tag: v258-rc1~718^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6be15dce13becd40682f799f7871fa4c2f862178;p=thirdparty%2Fsystemd.git basic: Remove assertions from missing_fs.h These assertions impose an include order between and "missing_fs.h", specifically can't be included before "missing_fs.h". This makes automated include refactoring very painful, so let's get rid of these assertions and instead assume that linux/fs.h does the right thing. --- diff --git a/src/basic/missing_fs.h b/src/basic/missing_fs.h index c3b2746b07a..1e2f07e55f7 100644 --- a/src/basic/missing_fs.h +++ b/src/basic/missing_fs.h @@ -1,50 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -/* temporary undef definitions in bits/uio-ext.h, which is included by sys/uio.h */ -#include - -#define __RWF_HIPRI_SAVED__ RWF_HIPRI -#undef RWF_HIPRI -#define __RWF_DSYNC_SAVED__ RWF_DSYNC -#undef RWF_DSYNC -#define __RWF_SYNC_SAVED__ RWF_SYNC -#undef RWF_SYNC -#define __RWF_NOWAIT_SAVED__ RWF_NOWAIT -#undef RWF_NOWAIT -#define __RWF_APPEND_SAVED__ RWF_APPEND -#undef RWF_APPEND -#define __RWF_NOAPPEND_SAVED__ RWF_NOAPPEND -#undef RWF_NOAPPEND -#if defined(RWF_ATOMIC) -#define __RWF_ATOMIC_SAVED__ RWF_ATOMIC -#undef RWF_ATOMIC -#else -#define __RWF_ATOMIC_SAVED__ 0x00000040 -#endif -#if defined(RWF_DONTCACHE) -#define __RWF_DONTCACHE_SAVED__ RWF_DONTCACHE -#undef RWF_DONTCACHE -#else -#define __RWF_DONTCACHE_SAVED__ 0x00000080 -#endif - -#include -#include #include -#include "macro.h" - -/* check RWF_xyz are redefined by linux/fs.h */ -assert_cc(RWF_HIPRI == __RWF_HIPRI_SAVED__); -assert_cc(RWF_DSYNC == __RWF_DSYNC_SAVED__); -assert_cc(RWF_SYNC == __RWF_SYNC_SAVED__); -assert_cc(RWF_NOWAIT == __RWF_NOWAIT_SAVED__); -assert_cc(RWF_APPEND == __RWF_APPEND_SAVED__); -assert_cc(RWF_NOAPPEND == __RWF_NOAPPEND_SAVED__); -assert_cc(RWF_ATOMIC == __RWF_ATOMIC_SAVED__); -assert_cc(RWF_DONTCACHE == __RWF_DONTCACHE_SAVED__); - /* Not exposed yet. Defined at fs/ext4/ext4.h */ #ifndef EXT4_IOC_RESIZE_FS #define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64) diff --git a/src/shared/btrfs-util.c b/src/shared/btrfs-util.c index 713ecb4eb57..d296ac682ca 100644 --- a/src/shared/btrfs-util.c +++ b/src/shared/btrfs-util.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/shared/copy.c b/src/shared/copy.c index c662853ac86..4288bae1cea 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/src/shared/resize-fs.c b/src/shared/resize-fs.c index b913aedef36..0f28869ea06 100644 --- a/src/shared/resize-fs.c +++ b/src/shared/resize-fs.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include #include diff --git a/src/udev/udev-builtin-btrfs.c b/src/udev/udev-builtin-btrfs.c index a1238f1e1b3..118b934b767 100644 --- a/src/udev/udev-builtin-btrfs.c +++ b/src/udev/udev-builtin-btrfs.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include +#include #include #include