commit:     faa75d431684f8efcebf1116128ae3e528d0889a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 19 23:36:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 23:37:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa75d43

sys-apps/file: fix configure w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../file/{file-5.43.ebuild => file-5.43-r1.ebuild}   |  1 +
 .../file/files/file-5.43-configure-clang16.patch     | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/sys-apps/file/file-5.43.ebuild b/sys-apps/file/file-5.43-r1.ebuild
similarity index 98%
rename from sys-apps/file/file-5.43.ebuild
rename to sys-apps/file/file-5.43-r1.ebuild
index 7a43ed771918..10bf50a18e4f 100644
--- a/sys-apps/file/file-5.43.ebuild
+++ b/sys-apps/file/file-5.43-r1.ebuild
@@ -51,6 +51,7 @@ BDEPEND+="
 PATCHES=(
        "${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
        "${FILESDIR}/file-5.40-seccomp-fstatat64-musl.patch" #789336, not 
upstream yet
+       "${FILESDIR}/${P}-configure-clang16.patch"
 )
 
 src_prepare() {

diff --git a/sys-apps/file/files/file-5.43-configure-clang16.patch 
b/sys-apps/file/files/file-5.43-configure-clang16.patch
new file mode 100644
index 000000000000..15fd5b1c4a05
--- /dev/null
+++ b/sys-apps/file/files/file-5.43-configure-clang16.patch
@@ -0,0 +1,20 @@
+https://github.com/file/file/commit/4502517cc7316569d5902ab65c97b3b8e46f8a25
+https://github.com/file/file/commit/8c845b7bbad085678695d3e70467b8eec3dfa7af
+--- a/configure
++++ b/configure
+@@ -14037,13 +14037,14 @@ else $as_nop
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <time.h>
++#include <stdlib.h>
+ int
+ main (void)
+ {
+ #if !HAVE_DECL_DAYLIGHT
+ extern int daylight;
+ #endif
+-atoi(daylight);
++daylight = atoi("1");
+   ;
+   return 0;
+ }

Reply via email to