From 9ac6b1ff120ebba1555e8343fad13021ccfcb21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 30 Sep 2013 14:20:23 +0000 Subject: main/libnet: fix musl build --- main/libnet/APKBUILD | 16 ++++++++++++++-- main/libnet/fix-includes.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 main/libnet/fix-includes.patch diff --git a/main/libnet/APKBUILD b/main/libnet/APKBUILD index a07acb871..006d8bab2 100644 --- a/main/libnet/APKBUILD +++ b/main/libnet/APKBUILD @@ -10,13 +10,20 @@ license="BSD" depends= makedepends="autoconf automake libtool" subpackages="$pkgname-dev" -source="http://downloads.sourceforge.net/project/libnet-dev/libnet-$pkgver.tar.gz" +source="http://downloads.sourceforge.net/project/libnet-dev/libnet-$pkgver.tar.gz + fix-includes.patch + " _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" update_config_sub || return 1 + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -36,4 +43,9 @@ package() { rm "$pkgdir"/usr/lib/*.la } -md5sums="710296fe424a49344e5fcc0d09e53317 libnet-1.1.6.tar.gz" +md5sums="710296fe424a49344e5fcc0d09e53317 libnet-1.1.6.tar.gz +b3b08990f91dd27b86e54337b26a03cb fix-includes.patch" +sha256sums="d392bb5825c4b6b672fc93a0268433c86dc964e1500c279dc6d0711ea6ec467a libnet-1.1.6.tar.gz +dfa926bf8bfa0f1c2c5e3f1ef36cb0e6f0a3f2b222c6c0d13bedd37da03ef217 fix-includes.patch" +sha512sums="a67e502b0e6957ca590e47cb50b0472dd83d622d84c62818d665d771616df91b5a8fa8fcf1040d13b7860aaabaf338152ef40f66ab97c3fc9502edb08cea0bb6 libnet-1.1.6.tar.gz +6cde8d5c5c3c34f9a02df5ae472f23b823aab293eed2588bbd6c836d228b1c180dc04208916cd6be7b11e02d6e5b2bfffda5e34ec1ceb99e83d1adfafff09231 fix-includes.patch" diff --git a/main/libnet/fix-includes.patch b/main/libnet/fix-includes.patch new file mode 100644 index 000000000..5eb86bc37 --- /dev/null +++ b/main/libnet/fix-includes.patch @@ -0,0 +1,29 @@ +--- libnet-1.1.6.orig/src/libnet_link_linux.c ++++ libnet-1.1.6/src/libnet_link_linux.c +@@ -30,26 +30,15 @@ + #include + + #include +-#if (__GLIBC__) + #include + #include +-#else +-#include +-#include +-#endif + + #if (HAVE_PACKET_SOCKET) + #ifndef SOL_PACKET + #define SOL_PACKET 263 + #endif /* SOL_PACKET */ +-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 + #include + #include /* the L2 protocols */ +-#else +-#include +-#include +-#include /* The L2 protocols */ +-#endif + #endif /* HAVE_PACKET_SOCKET */ + + #include "../include/libnet.h" -- cgit v1.2.3