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

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-11-19 23:36:31 +00:00
parent 540b27fe15
commit faa75d4316
2 changed files with 21 additions and 0 deletions

View File

@@ -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() {

View File

@@ -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;
}