Fix implicit definitions

OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=40
This commit is contained in:
Jan Engelhardt 2011-12-31 22:22:54 +00:00 committed by Git OBS Bridge
parent dd2d3fe874
commit b6d850e9bb
2 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,22 @@
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-12-31 23:16:27.428349795 +0100
gcc -DLIBDIR=\"/usr/lib64\" -D_GNU_SOURCE -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\"/usr/lib64/xtables\" -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -fPIC -c -o ipx_pton.o ipx_pton.c
In file included from ../include/utils.h:8:0,
from ipx_ntop.c:5:
../include/libnetlink.h: In function 'rta_getattr_u64':
../include/libnetlink.h:84:2: warning: implicit declaration of function 'memcpy'
../include/libnetlink.h:84:2: warning: incompatible implicit declaration of built-in function 'memcpy'
diff --git a/include/libnetlink.h b/include/libnetlink.h
index b237579..b0656ce 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -1,6 +1,7 @@
#ifndef __LIBNETLINK_H__
#define __LIBNETLINK_H__ 1
+#include <string.h>
#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>

View File

@ -29,14 +29,16 @@ License: GPL-2.0
#Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2 #Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2
Source0: %name-%version.tar.xz Source0: %name-%version.tar.xz
# PATCH-FIX-UPSTREAM iproute2-libdir-1.diff # PATCH-FIX-UPSTREAM iproute2-libdir-1.diff status=unknown
Patch0: iproute2-libdir-1.diff Patch0: iproute2-libdir-1.diff
# PATCH-??-OPENSUSE iproute2-HZ.diff # PATCH-??-OPENSUSE iproute2-HZ.diff status=noidea
Patch1: iproute2-HZ.diff Patch1: iproute2-HZ.diff
# PATCH-FIX-UPSTREAM iproute2-xt.diff # iproute2-xt.diff status=sent,waiting
Patch4: iproute2-xt.diff Patch4: iproute2-xt.diff
# PATCH-FIX-UPSTREAM iproute2-xt-detect.diff # iproute2-xt-detect.diff status=sent,waiting
Patch6: iproute2-xt-detect.diff Patch6: iproute2-xt-detect.diff
# iproute2-implicit-definition-of-memcpy.diff status=sent,waiting
Patch7: iproute2-implicit-definition-of-memcpy.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison db-devel flex BuildRequires: bison db-devel flex
BuildRequires: libpng-devel libtiff-devel pkgconfig >= 0.23 BuildRequires: libpng-devel libtiff-devel pkgconfig >= 0.23
@ -88,7 +90,7 @@ tar -xf "%{S:0}" --use=xz;
%endif %endif
%patch0 %patch0
%patch1 %patch1
%patch -P 4 -P 6 -p1 %patch -P 4 -P 6 -P 7 -p1
find . -name *.orig -print0 | xargs -r0 rm -v find . -name *.orig -print0 | xargs -r0 rm -v
%build %build
@ -131,7 +133,7 @@ rm %buildroot%_sbindir/ifcfg
%defattr(-,root,root) %defattr(-,root,root)
%doc doc/api-ip6-flowlabels.pdf doc/arpd.pdf doc/ip-cref.pdf %doc doc/api-ip6-flowlabels.pdf doc/arpd.pdf doc/ip-cref.pdf
%doc doc/ip-tunnels.pdf doc/nstat.pdf doc/rtstat.pdf doc/ss.pdf %doc doc/ip-tunnels.pdf doc/nstat.pdf doc/rtstat.pdf doc/ss.pdf
%doc ChangeLog examples/ ip/ifcfg ip/routef ip/routel %doc examples/ ip/ifcfg ip/routef ip/routel
%files -n libnetlink-devel %files -n libnetlink-devel
%defattr(-,root,root) %defattr(-,root,root)