diff --git a/libnl-1.1-no-extern-inline.patch b/libnl-1.1-no-extern-inline.patch new file mode 100644 index 0000000..16a4f8f --- /dev/null +++ b/libnl-1.1-no-extern-inline.patch @@ -0,0 +1,57 @@ +From 84fefcadcde5d6c343db7f5c1744f6b1f070bc71 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 14 May 2009 11:30:40 -0400 +Subject: [PATCH] Remove "inline" keyword from nl_object_priv(). + +"extern inline foo();" in a header file generates a compiler warning in +consumers of the library. Also, it doesn't make any sense whatsoever. +For this reason, and the fact that this function is not used at all in +the file in which it's defined, I have removed the "inline" keyword. +--- + doc/Doxyfile.in | 2 +- + include/netlink/object.h | 2 +- + lib/object.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in +index 0c518b7..396fcbc 100644 +--- a/doc/Doxyfile.in ++++ b/doc/Doxyfile.in +@@ -113,7 +113,7 @@ FULL_PATH_NAMES = YES + # If left blank the directory from which doxygen is run is used as the + # path to strip. + +-STRIP_FROM_PATH = ++STRIP_FROM_PATH = /home/pjones/build/BUILD/libnl-1.1 + + # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of + # the path mentioned in the documentation of a class, which tells +diff --git a/include/netlink/object.h b/include/netlink/object.h +index 751a1b3..241a2ad 100644 +--- a/include/netlink/object.h ++++ b/include/netlink/object.h +@@ -55,7 +55,7 @@ extern int nl_object_is_marked(struct nl_object *); + /* Access Functions */ + extern int nl_object_get_refcnt(struct nl_object *); + extern struct nl_cache * nl_object_get_cache(struct nl_object *); +-extern inline void * nl_object_priv(struct nl_object *); ++extern void * nl_object_priv(struct nl_object *); + + #ifdef __cplusplus + } +diff --git a/lib/object.c b/lib/object.c +index 74f6e2d..845ca1d 100644 +--- a/lib/object.c ++++ b/lib/object.c +@@ -376,7 +376,7 @@ struct nl_cache *nl_object_get_cache(struct nl_object *obj) + return obj->ce_cache; + } + +-inline void *nl_object_priv(struct nl_object *obj) ++void *nl_object_priv(struct nl_object *obj) + { + return obj; + } +-- +1.6.2.2 + diff --git a/libnl.spec b/libnl.spec index 65ae41d..34ee86b 100644 --- a/libnl.spec +++ b/libnl.spec @@ -3,7 +3,7 @@ Group: Development/Libraries License: LGPLv2 Name: libnl Version: 1.1 -Release: 6%{?dist} +Release: 9%{?dist} URL: http://people.suug.ch/~tgr/libnl/ Source: http://people.suug.ch/~tgr/libnl/files/libnl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -14,6 +14,7 @@ Patch3: libnl-1.0-pre8-use-vasprintf-retval.patch Patch4: libnl-1.0-pre8-more-build-output.patch Patch5: libnl-1.1-include-limits-h.patch Patch6: libnl-1.1-doc-inlinesrc.patch +Patch7: libnl-1.1-no-extern-inline.patch %description This package contains a convenience library to simplify @@ -38,6 +39,7 @@ This package contains various headers for using libnl %patch4 -p1 -b .more-build-output %patch5 -p1 -b .limits %patch6 -p1 -b .doc-inlinesrc +%patch7 -p1 -b .no-extern-inline # a quick hack to make doxygen stripping builddir from html outputs. sed -i.org -e "s,^STRIP_FROM_PATH.*,STRIP_FROM_PATH = `pwd`," doc/Doxyfile.in @@ -51,6 +53,13 @@ make gendoc %{__rm} -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT/%{_lib} +mv $RPM_BUILD_ROOT%{_libdir}/libnl.so.* $RPM_BUILD_ROOT/%{_lib} +for l in $RPM_BUILD_ROOT%{_libdir}/libnl.so; do + ln -sf $(echo %{_libdir} | \ + sed 's,\(^/\|\)[^/][^/]*,..,g')/%{_lib}/$(readlink $l) $l +done + %clean %{__rm} -rf $RPM_BUILD_ROOT @@ -59,7 +68,7 @@ make install DESTDIR=$RPM_BUILD_ROOT %files %defattr(-,root,root) -%{_libdir}/%{name}.so.* +/%{_lib}/%{name}.so.* %doc COPYING %files devel @@ -71,6 +80,15 @@ make install DESTDIR=$RPM_BUILD_ROOT %{_libdir}/pkgconfig/%{name}-1.pc %changelog +* Tue Dec 22 2009 John W. Linville - 1.1-9 +- Install libnl into /%{_lib} instead of %{_libdir} + +* Fri Jul 24 2009 Fedora Release Engineering - 1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu May 14 2009 Peter Jones - 1.1-7 +- Don't present "extern inline nl_object_priv();" to consumers in the headers. + * Wed Feb 25 2009 Fedora Release Engineering - 1.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild