dia: fix configure for c99 and gcc14

This commit is contained in:
oreo639 2024-02-19 18:54:13 -08:00
parent 0ad86a6af0
commit a3f924a9a1
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
Source: https://src.fedoraproject.org/rpms/dia/blob/7ebdbadff67fe2ee482d8655fcb3d361b31742f3/f/dia-configure-c99.patch
C99 removes support for implicit ints, so declare the return type
of main explicitly. Future compilers are likely to require explicit
type declarations.
Upstream has switched to Meson, and it does not seem to use this
particular check anymore.
diff --git a/configure b/configure
index 14cdc757c3ee0f15..504ae93d8e3a4f48 100755
--- a/configure
+++ b/configure
@@ -17571,7 +17571,7 @@ $as_echo_n "checking for png_structp in png.h... " >&6; }
png_structp pp;
png_infop info;
png_colorp cmap;
- main() { void*foo = png_create_read_struct; }
+ int main(void) { void*foo = png_create_read_struct; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
png_ok=yes
diff --git a/configure.in b/configure.in
index c5edeeddf766d5fb..f90ed4ef953af139 100644
--- a/configure.in
+++ b/configure.in
@@ -197,7 +197,7 @@ if test "$png_ok" = yes; then
png_structp pp;
png_infop info;
png_colorp cmap;
- main() { void*foo = png_create_read_struct; }],
+ int main(void) { void*foo = png_create_read_struct; }],
png_ok=yes,
png_ok=no)
LDFLAGS="${old_LDFLAGS}"