0ad/0ad-gcc-14.patch
Kalev Lember 1f85746e29 Fix compilation with GCC 14
Patch by Florian Weimer <fweimer@redhat.com>.

https://bugzilla.redhat.com/show_bug.cgi?id=2255223
2024-01-22 14:07:59 +01:00

38 lines
1.5 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -ur 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/config.h 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/config.h
--- 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/config.h 2022-08-21 14:46:10.000000000 +0200
+++ 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/config.h 2023-12-19 11:59:06.813263959 +0100
@@ -22,6 +22,8 @@
/* #undef HAVE_STRUCT_TM_TM_ZONE */
#ifdef _WIN32
#define HAVE_MOVEFILEEXA
+#else
+#define HAVE_UNISTD_H
#endif
/* #undef HAVE_STRINGS_H */
/* #undef HAVE_UNISTD_H */
diff -ur 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/mkstemp.c 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/mkstemp.c
--- 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/mkstemp.c 2022-08-21 14:46:10.000000000 +0200
+++ 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/mkstemp.c 2023-12-19 11:48:55.459472284 +0100
@@ -40,6 +40,8 @@
#include <fcntl.h>
#ifdef _WIN32
#include <io.h>
+#else
+#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff -ur 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/zip_fdopen.c 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/zip_fdopen.c
--- 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/zip_fdopen.c 2022-08-21 14:46:10.000000000 +0200
+++ 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/zip_fdopen.c 2023-12-19 12:06:24.709819140 +0100
@@ -35,6 +35,10 @@
#include "zipint.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
ZIP_EXTERN struct zip *