1
0
forked from pool/libtranscript
libtranscript/0001-build-fix-configure-failure-in-gcc-14.patch

49 lines
1.3 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From de2a4b8974bf05c8dbf55a9cd20c45834164d5bf Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Sat, 2 Nov 2024 23:15:00 +0100
Subject: [PATCH] build: fix configure failure in gcc-14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
References: https://github.com/gphalkes/transcript/pull/1
```
$ ./configure
Checking for opendir/readdir/closedir/dirent.h/stdint.h... no
!! Some required functionality is not available. See config.log for details.
$ cat config.log
.config.c:12:9: error: implicit declaration of function puts [-Wimplicit-function-declaration]
// once the right prototype is in view:
.config.c:13:27: error: passing argument 1 of puts makes pointer from integer without a cast [-Wint-conversion]
```
---
dist/config.pkg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dist/config.pkg b/dist/config.pkg
index e2f1d64..0ecd653 100644
--- a/config.pkg
+++ b/config.pkg
@@ -66,6 +66,7 @@ config() {
#include <sys/types.h>
#include <stdint.h>
#include <dirent.h>
+#include <stdio.h>
int main(int argc, char *argv[]) {
DIR *dir;
@@ -74,7 +75,7 @@ int main(int argc, char *argv[]) {
dir = opendir(".");
entry = readdir(dir);
- puts(entry->d_name[0]);
+ puts(entry->d_name);
closedir(dir);
return 0;
}
--
2.47.0