]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsns: improve dependence on NS_GET_ ioctls
authorKarel Zak <kzak@redhat.com>
Wed, 6 Apr 2022 08:38:43 +0000 (10:38 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Apr 2022 08:38:43 +0000 (10:38 +0200)
Fixes: http://autobuild.buildroot.org/results/572ecf8e37ac733a4e4265f4f78f35230337278e
Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsns.c

index 1a7e9f333482f0737792ca397c425b4337a1adbc..75625b3a6fec55c3f7230a401cd52ad5b218d922 100644 (file)
@@ -40,7 +40,9 @@
 
 #ifdef HAVE_LINUX_NSFS_H
 # include <linux/nsfs.h>
-# define USE_NS_GET_API        1
+# if defined(NS_GET_NSTYPE) && defined(NS_GET_OWNER_UID)
+#  define USE_NS_GET_API       1
+# endif
 #endif
 
 #include "pathnames.h"