aboutsummaryrefslogtreecommitdiffstats
path: root/main/libnl3
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-07-12 10:40:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-07-12 11:17:26 +0000
commit96d0531fc3e40e333e519d5e8bc672f391498d59 (patch)
tree13709b2082b1d33410006a100544cc9f2dd13739 /main/libnl3
parentab4e5f1f008c40eb8c0894f81d304661e91f493a (diff)
downloadaports-96d0531fc3e40e333e519d5e8bc672f391498d59.tar.bz2
aports-96d0531fc3e40e333e519d5e8bc672f391498d59.tar.xz
main/libnl3: upgrade to 3.4.0
Diffstat (limited to 'main/libnl3')
-rw-r--r--main/libnl3/APKBUILD13
-rw-r--r--main/libnl3/libnl3-musl.patch103
2 files changed, 110 insertions, 6 deletions
diff --git a/main/libnl3/APKBUILD b/main/libnl3/APKBUILD
index 7fc6df8754..eb9db896b0 100644
--- a/main/libnl3/APKBUILD
+++ b/main/libnl3/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnl3
-pkgver=3.2.28
-pkgrel=1
+pkgver=3.4.0
+pkgrel=0
pkgdesc="Library for applications dealing with netlink sockets"
url="http://www.infradead.org/~tgr/libnl/"
arch="all"
@@ -10,7 +10,9 @@ depends=
makedepends="linux-headers flex bison libtool autoconf automake"
checkdepends="check-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-cli"
-source="https://github.com/thom311/libnl/releases/download/libnl${pkgver//./_}/libnl-$pkgver.tar.gz"
+source="https://github.com/thom311/libnl/releases/download/libnl${pkgver//./_}/libnl-$pkgver.tar.gz
+ libnl3-musl.patch
+ "
builddir="$srcdir"/libnl-$pkgver
prepare () {
@@ -52,6 +54,5 @@ cli() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
-md5sums="bab12db1eb94a42129f712a44be91a67 libnl-3.2.28.tar.gz"
-sha256sums="cd608992c656e8f6e3ab6c1391b162a5a51c49336b9219f7f390e61fc5437c41 libnl-3.2.28.tar.gz"
-sha512sums="b5f145ecafb2625ed1c42594afd6063f112a601077de5c35884b3c3bc8c562b29b52a006ccebd795c127fe69692a82def425c8605afed7e6d441582943e803d9 libnl-3.2.28.tar.gz"
+sha512sums="6336e5c55c79ff2638de9c812cc1842871769236bad7f65c547dec35fafd91988b257fceab144a0cc133c4b29f61172f6552c53aa9fc723bdc783079c2b1851e libnl-3.4.0.tar.gz
+a31ec4b76d2fc472072f2d770cb3f5819a6477230a97603a476ce175c0c94d25e74eff8dc0ce2e6baa96f0e450b82db508a152f418bdd72919cbd5521d5f82fd libnl3-musl.patch"
diff --git a/main/libnl3/libnl3-musl.patch b/main/libnl3/libnl3-musl.patch
new file mode 100644
index 0000000000..e62653a0af
--- /dev/null
+++ b/main/libnl3/libnl3-musl.patch
@@ -0,0 +1,103 @@
+diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/if_ether.h libnl-3.3.0_rc1/include/linux-private/linux/if_ether.h
+--- libnl-3.3.0_rc1.orig/include/linux-private/linux/if_ether.h 2017-03-08 19:56:31.824516933 -0800
++++ libnl-3.3.0_rc1/include/linux-private/linux/if_ether.h 2017-03-08 20:07:01.938237767 -0800
+@@ -22,6 +22,7 @@
+ #define _LINUX_IF_ETHER_H
+
+ #include <linux/types.h>
++#include <linux/libc-compat.h>
+
+ /*
+ * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
+@@ -117,10 +118,12 @@
+ * This is an Ethernet frame header.
+ */
+
++#if __UAPI_DEF_ETHHDR
+ struct ethhdr {
+ unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
+ unsigned char h_source[ETH_ALEN]; /* source ether addr */
+ __be16 h_proto; /* packet type ID field */
+ } __attribute__((packed));
++#endif
+
+ #endif /* _LINUX_IF_ETHER_H */
+diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/libc-compat.h libnl-3.3.0_rc1/include/linux-private/linux/libc-compat.h
+--- libnl-3.3.0_rc1.orig/include/linux-private/linux/libc-compat.h 2017-03-08 19:56:31.823516923 -0800
++++ libnl-3.3.0_rc1/include/linux-private/linux/libc-compat.h 2017-03-08 20:12:30.376843489 -0800
+@@ -48,10 +48,18 @@
+ #ifndef _LIBC_COMPAT_H
+ #define _LIBC_COMPAT_H
+
+-/* We have included glibc headers... */
+-#if defined(__GLIBC__)
++/* We're used from userspace... */
++#if !defined(__KERNEL__)
+
+-/* Coordinate with glibc netinet/in.h header. */
++/* Coordinate with libc netinet/if_ether.h */
++#ifdef _NETINET_IF_ETHER_H /* musl */
++#define __UAPI_DEF_ETHHDR 0
++#else
++/* glibc uses __NETINET_IF_ETHER_H, and uses the uapi header. */
++#define __UAPI_DEF_ETHHDR 1
++#endif
++
++/* Coordinate with libc netinet/in.h header. */
+ #if defined(_NETINET_IN_H)
+
+ /* GLIBC headers included first so don't define anything
+@@ -64,15 +72,7 @@
+ #define __UAPI_DEF_IN_CLASS 0
+
+ #define __UAPI_DEF_IN6_ADDR 0
+-/* The exception is the in6_addr macros which must be defined
+- * if the glibc code didn't define them. This guard matches
+- * the guard in glibc/inet/netinet/in.h which defines the
+- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
+-#if defined(__USE_MISC) || defined (__USE_GNU)
+ #define __UAPI_DEF_IN6_ADDR_ALT 0
+-#else
+-#define __UAPI_DEF_IN6_ADDR_ALT 1
+-#endif
+ #define __UAPI_DEF_SOCKADDR_IN6 0
+ #define __UAPI_DEF_IPV6_MREQ 0
+ #define __UAPI_DEF_IPPROTO_V6 0
+@@ -83,7 +83,7 @@
+ #else
+
+ /* Linux headers included first, and we must define everything
+- * we need. The expectation is that glibc will check the
++ * we need. The expectation is that libc will check the
+ * __UAPI_DEF_* defines and adjust appropriately. */
+ #define __UAPI_DEF_IN_ADDR 1
+ #define __UAPI_DEF_IN_IPPROTO 1
+@@ -93,7 +93,7 @@
+ #define __UAPI_DEF_IN_CLASS 1
+
+ #define __UAPI_DEF_IN6_ADDR 1
+-/* We unconditionally define the in6_addr macros and glibc must
++/* We unconditionally define the in6_addr macros and libc must
+ * coordinate. */
+ #define __UAPI_DEF_IN6_ADDR_ALT 1
+ #define __UAPI_DEF_SOCKADDR_IN6 1
+@@ -115,7 +115,10 @@
+ /* If we did not see any headers from any supported C libraries,
+ * or we are being included in the kernel, then define everything
+ * that we need. */
+-#else /* !defined(__GLIBC__) */
++#else /* defined(__KERNEL__) */
++
++/* Definitions for if/ether.h */
++#define __UAPI_DEF_ETHHDR 1
+
+ /* Definitions for in.h */
+ #define __UAPI_DEF_IN_ADDR 1
+@@ -138,6 +141,6 @@
+ /* Definitions for xattr.h */
+ #define __UAPI_DEF_XATTR 1
+
+-#endif /* __GLIBC__ */
++#endif /* defined(__KERNEL__) */
+
+ #endif /* _LIBC_COMPAT_H */