mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-util/premake: fix modern C issues
Closes: https://bugs.gentoo.org/895842 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
59
dev-util/premake/files/premake-5.0.0-c99.patch
Normal file
59
dev-util/premake/files/premake-5.0.0-c99.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
https://bugs.gentoo.org/895842#c6
|
||||
diff '--color=auto' -burN premake-core-5.0.0-beta2-orig/contrib/libzip/config.h premake-core-5.0.0-beta2/contrib/libzip/config.h
|
||||
--- premake-core-5.0.0-beta2-orig/contrib/libzip/config.h 2022-09-02 21:11:21.000000000 +0200
|
||||
+++ premake-core-5.0.0-beta2/contrib/libzip/config.h 2024-05-17 14:07:31.072971328 +0200
|
||||
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
+#define HAVE_UNISTD_H 1
|
||||
#define __INT8_LIBZIP 1
|
||||
#define INT8_T_LIBZIP 1
|
||||
#define UINT8_T_LIBZIP 1
|
||||
diff '--color=auto' -burN premake-core-5.0.0-beta2-orig/contrib/libzip/mkstemp.c premake-core-5.0.0-beta2/contrib/libzip/mkstemp.c
|
||||
--- premake-core-5.0.0-beta2-orig/contrib/libzip/mkstemp.c 2022-09-02 21:11:21.000000000 +0200
|
||||
+++ premake-core-5.0.0-beta2/contrib/libzip/mkstemp.c 2024-05-17 14:07:31.073971328 +0200
|
||||
@@ -31,6 +31,8 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
+#include "zipint.h"
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -43,13 +45,14 @@
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
-
|
||||
-
|
||||
int
|
||||
_zip_mkstemp(char *path)
|
||||
{
|
||||
diff '--color=auto' -burN premake-core-5.0.0-beta2-orig/contrib/libzip/zip_fdopen.c premake-core-5.0.0-beta2/contrib/libzip/zip_fdopen.c
|
||||
--- premake-core-5.0.0-beta2-orig/contrib/libzip/zip_fdopen.c 2022-09-02 21:11:21.000000000 +0200
|
||||
+++ premake-core-5.0.0-beta2/contrib/libzip/zip_fdopen.c 2024-05-17 14:06:29.441972020 +0200
|
||||
@@ -31,11 +31,10 @@
|
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
-
|
||||
-
|
||||
#include "zipint.h"
|
||||
-
|
||||
-
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
ZIP_EXTERN struct zip *
|
||||
zip_fdopen(int fd_orig, int _flags, int *zep)
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -16,7 +16,10 @@ LICENSE="BSD"
|
||||
SLOT="5"
|
||||
KEYWORDS="~amd64 ~arm64 ppc x86"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-5.0.0-remove-hardcoded-libpath.patch" )
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.0.0-remove-hardcoded-libpath.patch"
|
||||
"${FILESDIR}/${PN}-5.0.0-c99.patch"
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
# bug #773505
|
||||
|
||||
Reference in New Issue
Block a user