]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsclocks: stop using MAX_CLOCKS
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 19 Aug 2025 16:13:02 +0000 (18:13 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 20 Aug 2025 06:41:15 +0000 (08:41 +0200)
MAX_CLOCKS is only available in the kernel UAPI headers and not libc
headers. Switch back to a hardcoded value. This value is a stable ABI
anyways and matches the other fallback definitions.

Fixes: d3c49ee062f7 ("lsclocks: use MAX_CLOCKS, improve indention")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/lsclocks.c

index 8c611816244547a57fa77276c01d9fb7a41a299f..aeecddec91ac39d41bb8e4203dc01ae0dc095d43 100644 (file)
@@ -84,7 +84,7 @@ static inline clockid_t FD_TO_CLOCKID(int fd)
 #endif
 
 #ifndef CLOCK_AUX
-# define CLOCK_AUX                     MAX_CLOCKS
+# define CLOCK_AUX                     16
 #endif
 
 #define CLOCK_AUX0                     (CLOCK_AUX + 0)