aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-04-01 11:58:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-04-01 11:58:28 +0000
commit9829a12686899b9540c08b1db1d531df70ba247c (patch)
tree64a2b9d797bf0eb71efee783782215b5222de06b /main
parent9c067835226004f6716ae55706be9c5826197245 (diff)
downloadaports-9829a12686899b9540c08b1db1d531df70ba247c.tar.bz2
aports-9829a12686899b9540c08b1db1d531df70ba247c.tar.xz
main/fortify-headers: add feature-test fix for mbsnrtowcs() and wcsnrtombs()
should fix py-crypto build
Diffstat (limited to 'main')
-rw-r--r--main/fortify-headers/APKBUILD12
-rw-r--r--main/fortify-headers/mbsnrtowcs.patch69
2 files changed, 77 insertions, 4 deletions
diff --git a/main/fortify-headers/APKBUILD b/main/fortify-headers/APKBUILD
index 2202531276..08ef4cbb0c 100644
--- a/main/fortify-headers/APKBUILD
+++ b/main/fortify-headers/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=fortify-headers
pkgver=0.3
-pkgrel=0
+pkgrel=1
pkgdesc="standalone fortify source implementation"
url="http://git.2f30.org/fortify-headers/"
arch="noarch"
@@ -13,6 +13,7 @@ makedepends="$depends_dev"
install=""
subpackages=""
source="http://dl.2f30.org/releases/$pkgname-$pkgver.tar.gz
+ mbsnrtowcs.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -36,6 +37,9 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la
}
-md5sums="0adda9abc732cd278386debbffb1fbd9 fortify-headers-0.3.tar.gz"
-sha256sums="82b9f1984b6b64b8d53e4a556d828c9f8e4feb2a8e3b444c185ed2f990265c2e fortify-headers-0.3.tar.gz"
-sha512sums="f85a3036f5c1be41c0a565e12bcce9b8d0a539adcc8d40146600c3b1bb290669b9122b64d655f4c6cbfc4366f80834b323a09cc663f0a806123db973d1f27a88 fortify-headers-0.3.tar.gz"
+md5sums="0adda9abc732cd278386debbffb1fbd9 fortify-headers-0.3.tar.gz
+9f3d939fb547db32c781cc0413e5d211 mbsnrtowcs.patch"
+sha256sums="82b9f1984b6b64b8d53e4a556d828c9f8e4feb2a8e3b444c185ed2f990265c2e fortify-headers-0.3.tar.gz
+1de3badec811bc6a4374c78905c182054247a3240db507f0bfe399bedc3564d2 mbsnrtowcs.patch"
+sha512sums="f85a3036f5c1be41c0a565e12bcce9b8d0a539adcc8d40146600c3b1bb290669b9122b64d655f4c6cbfc4366f80834b323a09cc663f0a806123db973d1f27a88 fortify-headers-0.3.tar.gz
+bafa89afbb6209b4ff77dcb140a1416d0c75246466f3ad3a481b30079ea26e74c5af82f81af256c831fc287775df7da0fbb43c955ab7e825daab527b8ce7f007 mbsnrtowcs.patch"
diff --git a/main/fortify-headers/mbsnrtowcs.patch b/main/fortify-headers/mbsnrtowcs.patch
new file mode 100644
index 0000000000..92006d86b4
--- /dev/null
+++ b/main/fortify-headers/mbsnrtowcs.patch
@@ -0,0 +1,69 @@
+From 73839e34a644fc95a9bc44603025b75aee74ef5b Mon Sep 17 00:00:00 2001
+From: sin <sin@2f30.org>
+Date: Wed, 1 Apr 2015 12:41:08 +0100
+Subject: [PATCH] Add feature-test guards for mbsnrtowcs() and wcsnrtombs()
+
+---
+ include/wchar.h | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/include/wchar.h b/include/wchar.h
+index aba1bd8..e2d56e8 100644
+--- a/include/wchar.h
++++ b/include/wchar.h
+@@ -11,7 +11,6 @@ extern "C" {
+ #endif
+
+ #undef fgetws
+-#undef mbsnrtowcs
+ #undef mbsrtowcs
+ #undef mbstowcs
+ #undef wcrtomb
+@@ -19,7 +18,6 @@ extern "C" {
+ #undef wcscpy
+ #undef wcsncat
+ #undef wcsncpy
+-#undef wcsnrtombs
+ #undef wcsrtombs
+ #undef wcstombs
+ #undef wctomb
+@@ -38,6 +36,9 @@ wchar_t *fgetws(wchar_t *s, int n, FILE *fp)
+ return __fgetws_orig(s, n, fp);
+ }
+
++#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
++ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
++#undef mbsnrtowcs
+ __typeof__(mbsnrtowcs) __mbsnrtowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbsnrtowcs");
+ extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
+ size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st)
+@@ -57,6 +58,7 @@ size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st
+ }
+ return r;
+ }
++#endif
+
+ __typeof__(mbsrtowcs) __mbsrtowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbsrtowcs");
+ extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
+@@ -145,6 +147,9 @@ wchar_t *wcsncpy(wchar_t *d, const wchar_t *s, size_t n)
+ return __wcsncpy_orig(d, s, n);
+ }
+
++#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
++ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
++#undef wcsnrtombs
+ __typeof__(wcsnrtombs) __wcsnrtombs_orig __asm__(__USER_LABEL_PREFIX__ "wcsnrtombs");
+ extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
+ size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st)
+@@ -164,6 +169,7 @@ size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st
+ }
+ return r;
+ }
++#endif
+
+ __typeof__(wcsrtombs) __wcsrtombs_orig __asm__(__USER_LABEL_PREFIX__ "wcsrtombs");
+ extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
+--
+2.3.3
+
+