This is the error when built with gcc-4.3

MAKE libnl.so.1.1
 CC addr.c
In file included from addr.c:28:
../include/netlink-local.h: In function '__str2type':
../include/netlink-local.h:218: error: 'ULONG_MAX' undeclared (first use in this function) ../include/netlink-local.h:218: error: (Each undeclared identifier is reported only once
../include/netlink-local.h:218: error: for each function it appears in.)
../include/netlink-local.h: In function '__list_str2type':
../include/netlink-local.h:239: error: 'ULONG_MAX' undeclared (first use in this function)
make[2]: *** [addr.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
   Aborting...

Here is a fix:

gcc-4.3.patch follows

--- include/netlink-local.h~    2008-01-14 10:48:45.000000000 -0500
+++ include/netlink-local.h    2009-04-25 08:16:28.981393890 -0400
@@ -27,6 +27,8 @@
#include <inttypes.h>
#include <assert.h>

+#include <limits.h>
+
#include <arpa/inet.h>
#include <netdb.h>

PKGBUILD changes:

# $Id: PKGBUILD 930 2008-04-24 22:14:40Z jgc $
# Maintainer: Jan de Groot <[email protected]>
# Contributor: William Rea <[email protected]>
pkgname=libnl
pkgver=1.1
pkgrel=1
pkgdesc="Library for applications dealing with netlink sockets"
arch=('i686' 'x86_64')
url="http://people.suug.ch/~tgr/libnl";
license=('GPL')
depends=('glibc')
source=(http://people.suug.ch/~tgr/${pkgname}/files/${pkgname}-${pkgver}.tar.gz gcc-4.3.patch)

build() {
 cd ${startdir}/src/libnl-${pkgver}
 patch -Np0 -i ../gcc-4.3.patch || return 1
 ./configure --prefix=/usr || return 1
 make || return 1
 make DESTDIR=${startdir}/pkg install || return 1
}
md5sums=('ae970ccd9144e132b68664f98e7ceeb1'
        '6cb6edc341e6ffc3c50bd8fcd90e5c89')

Reply via email to