mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
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: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
5f2233ea71
commit
0d2f3a409f
3 changed files with 19 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue