main/tdb: fix musl build

This commit is contained in:
Timo Teräs 2013-12-16 18:00:37 +00:00
parent 68515eb740
commit 2573bbf8bd
2 changed files with 93 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tdb
pkgver=1.2.12
pkgrel=1
pkgrel=2
pkgdesc="The tdb library"
url="http://tdb.samba.org/"
arch="all"
@ -11,7 +11,8 @@ depends_dev=""
makedepends="$depends_dev python-dev"
install=""
subpackages="$pkgname-dev py-$pkgname:_py $pkgname-libs"
source="http://samba.org/ftp/tdb/tdb-$pkgver.tar.gz"
source="http://samba.org/ftp/tdb/tdb-$pkgver.tar.gz
fix-libreplace.patch"
_builddir="$srcdir"/tdb-$pkgver
prepare() {
@ -58,6 +59,9 @@ libs() {
replaces="tdb"
}
md5sums="53e6168a7c2c93735a1c024fd2c3a7b4 tdb-1.2.12.tar.gz"
sha256sums="282d3db1cc56ac3011ae5f3922fd0c5bb217ecb0320836c23b6fe67f2163a71f tdb-1.2.12.tar.gz"
sha512sums="7f6061cae722db79a604ed517e615bed8d06c1b69549e6c1b771611797e1b4f64ebc7af63c3b911ed055979dd6782c8fca44af829c3466911f4181e835ef9b28 tdb-1.2.12.tar.gz"
md5sums="53e6168a7c2c93735a1c024fd2c3a7b4 tdb-1.2.12.tar.gz
b8c06c1a37bce8a7feea3b6896483da0 fix-libreplace.patch"
sha256sums="282d3db1cc56ac3011ae5f3922fd0c5bb217ecb0320836c23b6fe67f2163a71f tdb-1.2.12.tar.gz
13617f691c648b44867c1a76d8be7c185021e8a8f3b695f8689a9f6244e65827 fix-libreplace.patch"
sha512sums="7f6061cae722db79a604ed517e615bed8d06c1b69549e6c1b771611797e1b4f64ebc7af63c3b911ed055979dd6782c8fca44af829c3466911f4181e835ef9b28 tdb-1.2.12.tar.gz
4adbbeb75de6c55199e10f284e741ee252f403b7809251caf4baf378669770be01d469b23e12f8119ed5dca5080dd45bda1b5b78cc7a791be44c1eb6fb8c0fa2 fix-libreplace.patch"

View File

@ -0,0 +1,84 @@
--- talloc-2.1.0.orig/lib/replace/replace.c
+++ talloc-2.1.0/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
--- talloc-2.1.0.orig/lib/replace/replace.h
+++ talloc-2.1.0/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