]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libfrog: Define STATX__RESERVED if not provided by the system
authorJohannes Nixdorf <johannes@nixdorf.dev>
Sat, 9 Aug 2025 17:13:08 +0000 (19:13 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 8 Sep 2025 11:34:23 +0000 (13:34 +0200)
This define is not provided by musl libc. Use the fallback that is
already provided if statx and its types (tested on STATX_TYPE) are
not defined in the general case.

This fixes one cause for failing to compile against musl libc.

Signed-off-by: Johannes Nixdorf <johannes@nixdorf.dev>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Petr Vaněk <arkamar@gentoo.org>
libfrog/statx.h

index e11e2d8f49fa5fabf546fcdce8f4f9e2047300f2..9fb15adcfc1f765f7a242b9bfbc53d281e8dcaed 100644 (file)
@@ -191,7 +191,6 @@ statx(
 #define STATX_BLOCKS           0x00000400U     /* Want/got stx_blocks */
 #define STATX_BASIC_STATS      0x000007ffU     /* The stuff in the normal stat struct */
 #define STATX_BTIME            0x00000800U     /* Want/got stx_btime */
-#define STATX__RESERVED                0x80000000U     /* Reserved for future struct statx expansion */
 
 /*
  * This is deprecated, and shall remain the same value in the future.  To avoid
@@ -221,6 +220,10 @@ statx(
 
 #endif /* STATX_TYPE */
 
+#ifndef STATX__RESERVED
+#define STATX__RESERVED                0x80000000U     /* Reserved for future struct statx expansion */
+#endif
+
 #ifndef STATX_MNT_ID
 #define STATX_MNT_ID           0x00001000U     /* Got stx_mnt_id */
 #endif