pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libnl1: Fix build with musl libc



Module Name:	pkgsrc-wip
Committed By:	Sijmen J. Mulder <sjmulder%NetBSD.org@localhost>
Pushed By:	sjmulder
Date:		Sat Aug 7 11:08:27 2021 +0200
Changeset:	8927fc193fd90cc7dd3ca41563faa06f7c98149f

Modified Files:
	libnl1/distinfo
Added Files:
	libnl1/patches/patch-lib_netfilter_ct.c
	libnl1/patches/patch-lib_netfilter_log.c

Log Message:
libnl1: Fix build with musl libc

...by using more standard bswap_64() instead of __bswap_64() which is
unsupported there.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8927fc193fd90cc7dd3ca41563faa06f7c98149f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libnl1/distinfo                          |  2 ++
 libnl1/patches/patch-lib_netfilter_ct.c  | 16 ++++++++++++++++
 libnl1/patches/patch-lib_netfilter_log.c | 24 ++++++++++++++++++++++++
 3 files changed, 42 insertions(+)

diffs:
diff --git a/libnl1/distinfo b/libnl1/distinfo
index b8c7377270..1848896857 100644
--- a/libnl1/distinfo
+++ b/libnl1/distinfo
@@ -4,3 +4,5 @@ SHA1 (libnl-1.1.4.tar.gz) = 5068165a0a2952706cd802a7a2934dd13ec12429
 RMD160 (libnl-1.1.4.tar.gz) = 4d4f0599bc9348dbdb5a5affc960d76fab504a99
 SHA512 (libnl-1.1.4.tar.gz) = 25e26ddcc16540346ea34815ab6ac094177e5cee2eb3d843c4f8b30cd9d83390a3e87cb46046dc3bd9ae4d21f77e57bb3827c2cfc588eb18afe049921f2030b4
 Size (libnl-1.1.4.tar.gz) = 1174974 bytes
+SHA1 (patch-lib_netfilter_ct.c) = 6e7e90048a751eff4f6dd883e813df5c37a477a7
+SHA1 (patch-lib_netfilter_log.c) = 065df630d86b9633c670c6293c99a7fa4b66c71c
diff --git a/libnl1/patches/patch-lib_netfilter_ct.c b/libnl1/patches/patch-lib_netfilter_ct.c
new file mode 100644
index 0000000000..a2d6bb99c6
--- /dev/null
+++ b/libnl1/patches/patch-lib_netfilter_ct.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+- Use more standard bswap_64() since __bswap_64() is not supported on
+  musl-libc.
+
+--- lib/netfilter/ct.c.orig	2021-08-07 09:04:22.926000000 +0000
++++ lib/netfilter/ct.c
+@@ -37,7 +37,7 @@ static uint64_t ntohll(uint64_t x)
+ #elif __BYTE_ORDER == __LITTLE_ENDIAN
+ static uint64_t ntohll(uint64_t x)
+ {
+-	return __bswap_64(x);
++	return bswap_64(x);
+ }
+ #endif
+ 
diff --git a/libnl1/patches/patch-lib_netfilter_log.c b/libnl1/patches/patch-lib_netfilter_log.c
new file mode 100644
index 0000000000..3a2f61baeb
--- /dev/null
+++ b/libnl1/patches/patch-lib_netfilter_log.c
@@ -0,0 +1,24 @@
+$NetBSD$
+
+- Use more standard bswap_64() since __bswap_64() is not supported on
+  musl-libc.
+
+--- lib/netfilter/log.c.orig	2008-01-14 15:48:45.000000000 +0000
++++ lib/netfilter/log.c
+@@ -18,6 +18,7 @@
+  * @{
+  */
+ 
++#include <byteswap.h>
+ #include <sys/types.h>
+ #include <linux/netfilter/nfnetlink_log.h>
+ 
+@@ -36,7 +37,7 @@ static uint64_t ntohll(uint64_t x)
+ #elif __BYTE_ORDER == __LITTLE_ENDIAN
+ static uint64_t ntohll(uint64_t x)
+ {
+-	return __bswap_64(x);
++	return bswap_64(x);
+ }
+ #endif
+ 


Home | Main Index | Thread Index | Old Index