diff --git a/srcpkgs/dia/patches/gcc14.patch b/srcpkgs/dia/patches/gcc14.patch new file mode 100644 index 00000000000..64897e989a0 --- /dev/null +++ b/srcpkgs/dia/patches/gcc14.patch @@ -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}"