Commit 0d2f3a40 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

build: add a feature test for linux/net_namespace.h

This header was only introduced in 2015, so we need to build without it.

travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 5f2233ea
......@@ -18,7 +18,7 @@ export DEFINES += $(FEATURE_DEFINES)
export CFLAGS += $(FEATURE_DEFINES)
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW NET_NAMESPACE_H
# $1 - config name
define gen-feature-test
......
#include <unistd.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/net_namespace.h>
#include <linux/rtnetlink.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_conntrack.h>
......@@ -37,6 +36,13 @@
#include "protobuf.h"
#include "images/netdev.pb-c.h"
#ifdef CONFIG_HAS_NET_NAMESPACE_H
#include <linux/net_namespace.h>
#else
#define NETNSA_NSID 1
#define NETNSA_FD 3
#endif
#ifndef IFLA_LINK_NETNSID
#define IFLA_LINK_NETNSID 37
#endif
......
......@@ -88,3 +88,14 @@ int main(int argc, char *argv[], char *envp[])
}
endef
define FEATURE_TEST_NET_NAMESPACE_H
#include <linux/net_namespace.h>
int main(int argc, char **argv)
{
return 0;
}
endef
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment