Resolve SLE build failure

OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=65
This commit is contained in:
Jan Engelhardt 2013-04-17 06:54:13 +00:00 committed by Git OBS Bridge
parent 82ec9f13d9
commit de9706111f
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 8a204b39e28a195e34a6e59d360fce05853eec17 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 17 Apr 2013 08:44:46 +0200
Subject: [PATCH] build: resolve compile error due to missing include
Upstream: sent on Apr 17 08:53 +0200
I get a compilation error with linux-glibc-devel-2.6.32 (SLES 11 SP2):
ipnetns.c: In function 'netns_exec':
ipnetns.c:156: error: 'MS_SLAVE' undeclared (first use in this function)
ipnetns.c:156: error: (Each undeclared identifier is reported only once
ipnetns.c:156: error: for each function it appears in.)
ipnetns.c:156: error: 'MS_REC' undeclared (first use in this function)
ipnetns.c: In function 'netns_add':
ipnetns.c:372: error: 'MS_SHARED' undeclared (first use in this function)
ipnetns.c:372: error: 'MS_REC' undeclared (first use in this function)
make[1]: *** [ipnetns.o] Error 1
This patch fixes that.
---
ip/ipnetns.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index b047b97..48b1ad5 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
+#include <linux/fs.h>
#include "utils.h"
#include "ip_common.h"
--
1.8.2

16
iproute2-headers.diff Normal file
View File

@ -0,0 +1,16 @@
---
ip/ipnetns.c | 1 +
1 file changed, 1 insertion(+)
Index: iproute2-3.8.0/ip/ipnetns.c
===================================================================
--- iproute2-3.8.0.orig/ip/ipnetns.c
+++ iproute2-3.8.0/ip/ipnetns.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
+#include <linux/fs.h>
#include "utils.h"
#include "ip_common.h"

View File

@ -7,6 +7,7 @@ Mon Apr 15 07:31:11 UTC 2013 - jengelh@inai.de
* add `ip netns pids` and `ip netns identify`
* tc netem: allow negative packet/cell overhead
* support tunnels in `ip link type ipip|sit|ip6tnl`
- Add 0001-build-resolve-compile-error-due-to-missing-include.patch
-------------------------------------------------------------------
Thu Dec 13 06:43:49 UTC 2012 - jengelh@inai.de

View File

@ -32,12 +32,14 @@ Source2: %name-%version.tar.sign
Patch1: iproute2-dirs.diff
Patch2: iproute2-HZ.diff
Patch3: revert-pdf-creation.diff
Patch4: 0001-build-resolve-compile-error-due-to-missing-include.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison
BuildRequires: db-devel
BuildRequires: flex
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
#BuildRequires: linux-glibc-devel >= 2.6.15
BuildRequires: pkgconfig >= 0.21
BuildRequires: xorg-x11-devel
BuildRequires: xz
@ -108,6 +110,7 @@ tar -xf "%{S:0}" --use=xz;
%if 0%{?sles_version} == 11 || (0%{?suse_version} && 0%{?suse_version} <= 1220)
%patch -P 3 -p1
%endif
%patch -P 4 -p1
find . -name *.orig -delete
%build