tools/tests: allow depriv-fd-checker to build with really old Linux headers
authorJan Beulich <JBeulich@suse.com>
Fri, 31 Aug 2018 07:02:42 +0000 (01:02 -0600)
committerWei Liu <wei.liu2@citrix.com>
Thu, 13 Sep 2018 16:19:11 +0000 (17:19 +0100)
Assuming it was intentional for this test utility, other than most other
ones, to always be built, I think it would be nice if it didn't fail to
build on really old distros just because of the lack of a TUNGETIFF
definition.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/tests/depriv/depriv-fd-checker.c

index e57390f66335b3dad72459e8cc40d5e4ee90ea67..98a27a03d5438b783c6ae4cf0c23591b48b57c93 100644 (file)
@@ -330,6 +330,9 @@ static void check_appendonly(void) {
 #include <sys/socket.h>
 #include <linux/if.h>
 #include <linux/if_tun.h>
+#ifndef TUNGETIFF
+#define TUNGETIFF _IOR('T', 210, unsigned int)
+#endif
 
 /* linux tun */