From b95ae7df93fa3a7eb403ca06efd6c368f74525ab Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 7 May 2015 09:29:11 +0200 Subject: [PATCH] tdb: unbreak musl build, patch from Alpine. --- srcpkgs/tdb/patches/fix-libreplace.patch | 84 ++++++++++++++++++++++++ srcpkgs/tdb/template | 2 +- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/tdb/patches/fix-libreplace.patch diff --git a/srcpkgs/tdb/patches/fix-libreplace.patch b/srcpkgs/tdb/patches/fix-libreplace.patch new file mode 100644 index 00000000000..05b77c582ff --- /dev/null +++ b/srcpkgs/tdb/patches/fix-libreplace.patch @@ -0,0 +1,84 @@ +--- lib/replace/replace.c ++++ lib/replace/replace.c +@@ -508,28 +508,6 @@ + # error "You need a strtoll function" + #endif + } +-#else +-#ifdef HAVE_BSD_STRTOLL +-#ifdef HAVE_STRTOQ +-long long int rep_strtoll(const char *str, char **endptr, int base) +-{ +- long long int nb = strtoq(str, endptr, base); +- /* In linux EINVAL is only returned if base is not ok */ +- if (errno == EINVAL) { +- if (base == 0 || (base >1 && base <37)) { +- /* Base was ok so it's because we were not +- * able to make the convertion. +- * Let's reset errno. +- */ +- errno = 0; +- } +- } +- return nb; +-} +-#else +-#error "You need the strtoq function" +-#endif /* HAVE_STRTOQ */ +-#endif /* HAVE_BSD_STRTOLL */ + #endif /* HAVE_STRTOLL */ + + +@@ -546,28 +524,6 @@ + # error "You need a strtoull function" + #endif + } +-#else +-#ifdef HAVE_BSD_STRTOLL +-#ifdef HAVE_STRTOUQ +-unsigned long long int rep_strtoull(const char *str, char **endptr, int base) +-{ +- unsigned long long int nb = strtouq(str, endptr, base); +- /* In linux EINVAL is only returned if base is not ok */ +- if (errno == EINVAL) { +- if (base == 0 || (base >1 && base <37)) { +- /* Base was ok so it's because we were not +- * able to make the convertion. +- * Let's reset errno. +- */ +- errno = 0; +- } +- } +- return nb; +-} +-#else +-#error "You need the strtouq function" +-#endif /* HAVE_STRTOUQ */ +-#endif /* HAVE_BSD_STRTOLL */ + #endif /* HAVE_STRTOULL */ + + #ifndef HAVE_SETENV +--- lib/replace/replace.h ++++ lib/replace/replace.h +@@ -355,21 +355,11 @@ + #ifndef HAVE_STRTOLL + #define strtoll rep_strtoll + long long int rep_strtoll(const char *str, char **endptr, int base); +-#else +-#ifdef HAVE_BSD_STRTOLL +-#define strtoll rep_strtoll +-long long int rep_strtoll(const char *str, char **endptr, int base); + #endif +-#endif + + #ifndef HAVE_STRTOULL + #define strtoull rep_strtoull + unsigned long long int rep_strtoull(const char *str, char **endptr, int base); +-#else +-#ifdef HAVE_BSD_STRTOLL /* yes, it's not HAVE_BSD_STRTOULL */ +-#define strtoull rep_strtoull +-unsigned long long int rep_strtoull(const char *str, char **endptr, int base); +-#endif + #endif + + #ifndef HAVE_FTRUNCATE diff --git a/srcpkgs/tdb/template b/srcpkgs/tdb/template index 8a1bfc4ab1d..81f8cb68451 100644 --- a/srcpkgs/tdb/template +++ b/srcpkgs/tdb/template @@ -1,7 +1,7 @@ # Template build file for 'tdb'. pkgname=tdb version=1.3.5 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config python libxslt docbook-xsl" short_desc="Hierarchical pool based memory allocator with destructors"