commit:     a8cfa5cc19b6f475e4fd2a3b4484eb9d7fc78994
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Tue Jan 30 21:41:13 2018 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Tue Jan 30 21:41:13 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=a8cfa5cc

dev-libs/libbsd: add patch

there's definitely a way to do this that doesn't break glibc
compatibility

 dev-libs/libbsd/files/libbsd-0.8.7-musl.patch | 26 ++++++++++++++++++++++++++
 dev-libs/libbsd/libbsd-0.8.7.ebuild           |  1 +
 2 files changed, 27 insertions(+)

diff --git a/dev-libs/libbsd/files/libbsd-0.8.7-musl.patch 
b/dev-libs/libbsd/files/libbsd-0.8.7-musl.patch
new file mode 100644
index 0000000..b541ff4
--- /dev/null
+++ b/dev-libs/libbsd/files/libbsd-0.8.7-musl.patch
@@ -0,0 +1,26 @@
+diff -Naur libbsd-0.8.7.orig/include/bsd/stdlib.h 
libbsd-0.8.7/include/bsd/stdlib.h
+--- libbsd-0.8.7.orig/include/bsd/stdlib.h     2018-01-30 13:28:46.240353330 
-0800
++++ libbsd-0.8.7/include/bsd/stdlib.h  2018-01-30 13:39:33.539341738 -0800
+@@ -67,9 +67,7 @@
+                const unsigned char *table, unsigned endbyte);
+ 
+ void *reallocf(void *ptr, size_t size);
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26)
+ void *reallocarray(void *ptr, size_t nmemb, size_t size);
+-#endif
+ 
+ long long strtonum(const char *nptr, long long minval, long long maxval,
+                    const char **errstr);
+diff -Naur libbsd-0.8.7.orig/include/bsd/string.h 
libbsd-0.8.7/include/bsd/string.h
+--- libbsd-0.8.7.orig/include/bsd/string.h     2018-01-30 13:28:46.239353330 
-0800
++++ libbsd-0.8.7/include/bsd/string.h  2018-01-30 13:39:27.108341853 -0800
+@@ -42,9 +42,7 @@
+ char *strnstr(const char *str, const char *find, size_t str_len);
+ void strmode(mode_t mode, char *str);
+ 
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25)
+ void explicit_bzero(void *buf, size_t len);
+-#endif
+ __END_DECLS
+ 
+ #endif

diff --git a/dev-libs/libbsd/libbsd-0.8.7.ebuild 
b/dev-libs/libbsd/libbsd-0.8.7.ebuild
index 338666f..938d433 100644
--- a/dev-libs/libbsd/libbsd-0.8.7.ebuild
+++ b/dev-libs/libbsd/libbsd-0.8.7.ebuild
@@ -18,6 +18,7 @@ RDEPEND=""
 
 src_prepare() {
        eapply "${FILESDIR}"/${PN}-0.8.5-cdef-headers.patch
+       eapply "${FILESDIR}"/${PN}-0.8.7-musl.patch
        default
 }
 

Reply via email to