From 4116e327afee80aaea33a16358f5f7c0da687bec Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 16 Jun 2015 13:12:11 +0200 Subject: [PATCH] gnunet: update source and fix build with musl Signed-off-by: Daniel Golle --- net/gnunet/Makefile | 4 +- .../patches/010-cross-compile-fixes.patch | 6 +- net/gnunet/patches/011-no-fpu-includes.patch | 18 ++--- .../012-work-around-bad-workarounds.patch | 48 ++++-------- net/gnunet/patches/100-musl-malloc.patch | 77 +++++++++++++++++++ net/gnunet/patches/101-include-byteswap.patch | 11 +++ 6 files changed, 114 insertions(+), 50 deletions(-) create mode 100644 net/gnunet/patches/100-musl-malloc.patch create mode 100644 net/gnunet/patches/101-include-byteswap.patch diff --git a/net/gnunet/Makefile b/net/gnunet/Makefile index bd4d9cb00..f5c44c96d 100644 --- a/net/gnunet/Makefile +++ b/net/gnunet/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnunet -PKG_SOURCE_VERSION:=35865 +PKG_SOURCE_VERSION:=35933 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION) -PKG_RELEASE:=2 +PKG_RELEASE:=1 # ToDo: # - break-out transports diff --git a/net/gnunet/patches/010-cross-compile-fixes.patch b/net/gnunet/patches/010-cross-compile-fixes.patch index 820692700..515f75c10 100644 --- a/net/gnunet/patches/010-cross-compile-fixes.patch +++ b/net/gnunet/patches/010-cross-compile-fixes.patch @@ -1,7 +1,5 @@ -Index: gnunet-0.10.1/configure.ac -=================================================================== ---- gnunet-0.10.1.orig/configure.ac -+++ gnunet-0.10.1/configure.ac +--- a/configure.ac ++++ b/configure.ac @@ -194,7 +194,7 @@ AM_CONDITIONAL(GNU, test "$build_target" AC_MSG_RESULT([$build_target]) AC_SUBST(build_target) diff --git a/net/gnunet/patches/011-no-fpu-includes.patch b/net/gnunet/patches/011-no-fpu-includes.patch index cb07e3252..60eb0b401 100644 --- a/net/gnunet/patches/011-no-fpu-includes.patch +++ b/net/gnunet/patches/011-no-fpu-includes.patch @@ -1,7 +1,5 @@ -Index: gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c -=================================================================== ---- gnunet-0.10.1.orig/src/dht/gnunet-service-dht_neighbours.c -+++ gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c +--- a/src/dht/gnunet-service-dht_neighbours.c ++++ b/src/dht/gnunet-service-dht_neighbours.c @@ -45,7 +45,6 @@ #include "gnunet-service-dht_neighbours.h" #include "gnunet-service-dht_nse.h" @@ -10,10 +8,8 @@ Index: gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c #include "dht.h" #define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__) -Index: gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c -=================================================================== ---- gnunet-0.10.1.orig/src/dht/gnunet-service-wdht_neighbours.c -+++ gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c +--- a/src/dht/gnunet-service-wdht_neighbours.c ++++ b/src/dht/gnunet-service-wdht_neighbours.c @@ -44,7 +44,6 @@ #include "gnunet-service-wdht_datacache.h" #include "gnunet-service-wdht_neighbours.h" @@ -22,10 +18,8 @@ Index: gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c #include #include #include "dht.h" -Index: gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c -=================================================================== ---- gnunet-0.10.1.orig/src/dht/gnunet-service-xdht_neighbours.c -+++ gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c +--- a/src/dht/gnunet-service-xdht_neighbours.c ++++ b/src/dht/gnunet-service-xdht_neighbours.c @@ -41,7 +41,6 @@ #include "gnunet-service-xdht_datacache.h" #include "gnunet-service-xdht_neighbours.h" diff --git a/net/gnunet/patches/012-work-around-bad-workarounds.patch b/net/gnunet/patches/012-work-around-bad-workarounds.patch index d4875600f..9ae6a6255 100644 --- a/net/gnunet/patches/012-work-around-bad-workarounds.patch +++ b/net/gnunet/patches/012-work-around-bad-workarounds.patch @@ -1,7 +1,5 @@ -Index: gnunet-0.10.1-svn35844/m4/libgnurl.m4 -=================================================================== ---- gnunet-0.10.1-svn35844.orig/m4/libgnurl.m4 -+++ gnunet-0.10.1-svn35844/m4/libgnurl.m4 +--- a/m4/libgnurl.m4 ++++ b/m4/libgnurl.m4 @@ -146,7 +146,7 @@ AC_DEFUN([LIBGNURL_CHECK_CONFIG], _libgnurl_save_libs=$LIBS LIBS="$LIBGNURL $LIBS" @@ -11,10 +9,8 @@ Index: gnunet-0.10.1-svn35844/m4/libgnurl.m4 /* Try and use a few common options to force a failure if we are missing symbols or can't link. */ int x; -Index: gnunet-0.10.1-svn35844/src/gns/gnunet-gns-proxy.c -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/gns/gnunet-gns-proxy.c -+++ gnunet-0.10.1-svn35844/src/gns/gnunet-gns-proxy.c +--- a/src/gns/gnunet-gns-proxy.c ++++ b/src/gns/gnunet-gns-proxy.c @@ -29,7 +29,7 @@ */ #include "platform.h" @@ -24,10 +20,8 @@ Index: gnunet-0.10.1-svn35844/src/gns/gnunet-gns-proxy.c #include #include #include -Index: gnunet-0.10.1-svn35844/src/gns/test_gns_proxy.c -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/gns/test_gns_proxy.c -+++ gnunet-0.10.1-svn35844/src/gns/test_gns_proxy.c +--- a/src/gns/test_gns_proxy.c ++++ b/src/gns/test_gns_proxy.c @@ -24,7 +24,7 @@ * @author Martin Schanzenbach */ @@ -37,10 +31,8 @@ Index: gnunet-0.10.1-svn35844/src/gns/test_gns_proxy.c #include #include "gnunet_namestore_service.h" #include "gnunet_gns_service.h" -Index: gnunet-0.10.1-svn35844/src/hostlist/gnunet-daemon-hostlist_client.c -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/hostlist/gnunet-daemon-hostlist_client.c -+++ gnunet-0.10.1-svn35844/src/hostlist/gnunet-daemon-hostlist_client.c +--- a/src/hostlist/gnunet-daemon-hostlist_client.c ++++ b/src/hostlist/gnunet-daemon-hostlist_client.c @@ -29,7 +29,7 @@ #include "gnunet_statistics_service.h" #include "gnunet_transport_service.h" @@ -50,10 +42,8 @@ Index: gnunet-0.10.1-svn35844/src/hostlist/gnunet-daemon-hostlist_client.c /** -Index: gnunet-0.10.1-svn35844/src/pt/test_gns_vpn.c -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/pt/test_gns_vpn.c -+++ gnunet-0.10.1-svn35844/src/pt/test_gns_vpn.c +--- a/src/pt/test_gns_vpn.c ++++ b/src/pt/test_gns_vpn.c @@ -24,7 +24,7 @@ * @author Martin Schanzenbach */ @@ -63,10 +53,8 @@ Index: gnunet-0.10.1-svn35844/src/pt/test_gns_vpn.c #include #include "gnunet_identity_service.h" #include "gnunet_namestore_service.h" -Index: gnunet-0.10.1-svn35844/src/pt/test_gnunet_vpn.c -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/pt/test_gnunet_vpn.c -+++ gnunet-0.10.1-svn35844/src/pt/test_gnunet_vpn.c +--- a/src/pt/test_gnunet_vpn.c ++++ b/src/pt/test_gnunet_vpn.c @@ -24,7 +24,7 @@ * @author Christian Grothoff */ @@ -76,10 +64,8 @@ Index: gnunet-0.10.1-svn35844/src/pt/test_gnunet_vpn.c #include #include "gnunet_vpn_service.h" #include "gnunet_testing_lib.h" -Index: gnunet-0.10.1-svn35844/src/transport/plugin_transport_http.h -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/transport/plugin_transport_http.h -+++ gnunet-0.10.1-svn35844/src/transport/plugin_transport_http.h +--- a/src/transport/plugin_transport_http.h ++++ b/src/transport/plugin_transport_http.h @@ -41,7 +41,7 @@ #include "gnunet_os_lib.h" #include "gnunet_nat_lib.h" @@ -89,10 +75,8 @@ Index: gnunet-0.10.1-svn35844/src/transport/plugin_transport_http.h #define DEBUG_HTTP GNUNET_EXTRA_LOGGING -Index: gnunet-0.10.1-svn35844/src/transport/plugin_transport_http_client.c -=================================================================== ---- gnunet-0.10.1-svn35844.orig/src/transport/plugin_transport_http_client.c -+++ gnunet-0.10.1-svn35844/src/transport/plugin_transport_http_client.c +--- a/src/transport/plugin_transport_http_client.c ++++ b/src/transport/plugin_transport_http_client.c @@ -49,7 +49,7 @@ #include "gnunet_protocols.h" #include "gnunet_transport_plugin.h" diff --git a/net/gnunet/patches/100-musl-malloc.patch b/net/gnunet/patches/100-musl-malloc.patch new file mode 100644 index 000000000..ef881c83e --- /dev/null +++ b/net/gnunet/patches/100-musl-malloc.patch @@ -0,0 +1,77 @@ +--- a/src/util/gnunet-service-resolver.c ++++ b/src/util/gnunet-service-resolver.c +@@ -603,7 +603,7 @@ main (int argc, char *const *argv) + return ret; + } + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + /** +--- a/src/arm/gnunet-service-arm.c ++++ b/src/arm/gnunet-service-arm.c +@@ -1563,7 +1563,7 @@ main (int argc, char *const *argv) + } + + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + /** +--- a/src/nse/gnunet-service-nse.c ++++ b/src/nse/gnunet-service-nse.c +@@ -1629,7 +1629,7 @@ main (int argc, + } + + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + /** +--- a/src/regex/gnunet-daemon-regexprofiler.c ++++ b/src/regex/gnunet-daemon-regexprofiler.c +@@ -382,7 +382,7 @@ main (int argc, char *const *argv) + } + + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + /** +--- a/src/revocation/gnunet-service-revocation.c ++++ b/src/revocation/gnunet-service-revocation.c +@@ -933,7 +933,7 @@ main (int argc, + } + + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + +--- a/src/statistics/gnunet-service-statistics.c ++++ b/src/statistics/gnunet-service-statistics.c +@@ -1077,7 +1077,7 @@ main (int argc, char *const *argv) + &run, NULL)) ? 0 : 1; + } + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + /** +--- a/src/topology/gnunet-daemon-topology.c ++++ b/src/topology/gnunet-daemon-topology.c +@@ -1327,7 +1327,7 @@ main (int argc, char *const *argv) + } + + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + + /** diff --git a/net/gnunet/patches/101-include-byteswap.patch b/net/gnunet/patches/101-include-byteswap.patch new file mode 100644 index 000000000..89012635b --- /dev/null +++ b/net/gnunet/patches/101-include-byteswap.patch @@ -0,0 +1,11 @@ +--- a/src/include/gnunet_common.h ++++ b/src/include/gnunet_common.h +@@ -49,6 +49,8 @@ + #include + #endif + ++#include ++ + #ifdef __cplusplus + extern "C" + {