From a4c3992d87691624583cc7fb96d1d6cbba309d8e Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Tue, 12 Feb 2019 18:56:16 -0500 Subject: [PATCH] dev-libs/libbsd: fix bug #677746 Signed-off-by: Anthony G. Basile Package-Manager: Portage-2.3.51, Repoman-2.3.11 --- .../files/libbsd-0.9.1-missing-header.patch | 43 +++++++++++++++++++ dev-libs/libbsd/libbsd-0.9.1.ebuild | 6 ++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 dev-libs/libbsd/files/libbsd-0.9.1-missing-header.patch diff --git a/dev-libs/libbsd/files/libbsd-0.9.1-missing-header.patch b/dev-libs/libbsd/files/libbsd-0.9.1-missing-header.patch new file mode 100644 index 0000000000000..7ca2b881a3887 --- /dev/null +++ b/dev-libs/libbsd/files/libbsd-0.9.1-missing-header.patch @@ -0,0 +1,43 @@ +From 13c32916b4baab58d93940d57fea9ff0777f1931 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Tue, 5 Jun 2018 19:21:46 +0300 +Subject: flopen: Add missing include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit 993828d84ee (Add flopenat() function from FreeBSD) dropped the +fcntl.h header. This breaks the build with musl libc: + +flopen.c: In function ‘vflopenat’: +flopen.c:60:14: error: ‘O_CREAT’ undeclared (first use in this function) + if (flags & O_CREAT) { + ^~~~~~~ + +Restore the fcntl.h header include to fix the build. + +Fixes: commit 993828d84eed0468c6c15b2818e534e6b134b8e4 +Submitted-also-by: parazyd +Signed-off-by: Baruch Siach +Signed-off-by: Guillem Jover +--- + src/flopen.c | 1 + + 1 file changed, 1 insertion(+) + +(limited to 'src/flopen.c') + +diff --git a/src/flopen.c b/src/flopen.c +index b9972c9..ff20d07 100644 +--- a/src/flopen.c ++++ b/src/flopen.c +@@ -32,6 +32,7 @@ + #include + + #include ++#include + #include + #include + +-- +cgit v1.1 + diff --git a/dev-libs/libbsd/libbsd-0.9.1.ebuild b/dev-libs/libbsd/libbsd-0.9.1.ebuild index a3299a2bcae93..fbc48c4614da4 100644 --- a/dev-libs/libbsd/libbsd-0.9.1.ebuild +++ b/dev-libs/libbsd/libbsd-0.9.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -16,6 +16,10 @@ IUSE="static-libs" DEPEND=">=sys-kernel/linux-headers-3.17" RDEPEND="" +PATCHES=( + "${FILESDIR}/${P}-missing-header.patch" +) + pkg_setup() { local f="${EROOT}/usr/$(get_libdir)/${PN}.a" local m="You need to remove ${f} by hand or re-emerge sys-libs/glibc first."