]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
pidfd-utils: move USE_PIDFD_INO_SUPPORT after syscall fallbacks
authorKarel Zak <kzak@redhat.com>
Wed, 18 Feb 2026 09:34:46 +0000 (10:34 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Feb 2026 09:34:46 +0000 (10:34 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/pidfd-utils.h

index 2020655b067f369a5bffea90ff755716c00a6ed7..9708459bf2367deef6bc7f2ee3b42ea59d251999 100644 (file)
 # define PIDFD_GET_UTS_NAMESPACE               _IO(PIDFS_IOCTL_MAGIC, 10)
 #endif
 
-#if (defined(HAVE_PIDFD_OPEN) || defined(SYS_pidfd_open)) && defined(HAVE_STATX) \
-       && defined(HAVE_STRUCT_STATX)
-#define USE_PIDFD_INO_SUPPORT 1
-#endif
-
 #ifdef HAVE_SYS_SYSCALL_H
 # include <sys/syscall.h>
 # include <unistd.h>
@@ -66,6 +61,9 @@ static inline int pidfd_getfd(int pidfd, int targetfd, unsigned int flags)
 # endif
 #endif /* HAVE_SYS_SYSCALL_H */
 
+#if defined(HAVE_PIDFD_OPEN) && defined(HAVE_STATX) && defined(HAVE_STRUCT_STATX)
+# define USE_PIDFD_INO_SUPPORT 1
+#endif
 
 /*
  * Dummy fallbacks for cases when #ifdef HAVE_PIDFD_* makes the code too complex.