diff options
| author | Petr Vaněk <arkamar@gentoo.org> | 2025-03-03 12:38:37 +0100 |
|---|---|---|
| committer | Petr Vaněk <arkamar@gentoo.org> | 2025-03-03 13:05:49 +0100 |
| commit | f1015f45233053c975697981e6078b0dce19e5ba (patch) | |
| tree | a4cd2df8bf78aca20b7b794492c7c28a67aeff54 /dev-lang/jwasm/files | |
| parent | ed703d14ee82c5b4281bf81c67b189a8379efb68 (diff) | |
| download | gentoo-f1015f45233053c975697981e6078b0dce19e5ba.tar.gz gentoo-f1015f45233053c975697981e6078b0dce19e5ba.tar.bz2 gentoo-f1015f45233053c975697981e6078b0dce19e5ba.zip | |
dev-lang/jwasm: GCC 15 fixes
- add missing includes and append -D_POSIX_SOURCE cppflag in order to
resolve implicit function declaration issues
- set -std=c17 because upstream typedefs bool in code base
Upstream-PR: https://github.com/Baron-von-Riedesel/JWasm/pull/34
Closes: https://bugs.gentoo.org/944893
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'dev-lang/jwasm/files')
| -rw-r--r-- | dev-lang/jwasm/files/jwasm-2.18-missing-includes.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-lang/jwasm/files/jwasm-2.18-missing-includes.patch b/dev-lang/jwasm/files/jwasm-2.18-missing-includes.patch new file mode 100644 index 000000000000..08a6aa40ebd2 --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.18-missing-includes.patch @@ -0,0 +1,56 @@ +From fa8bf4476f74679c1a5e1a4ca55bf5327b4bd558 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@gentoo.org> +Date: Mon, 3 Mar 2025 12:16:23 +0100 +Subject: [PATCH] add missing includes + +Several includes are missing based on linux man pages: + +- strings.h for strcasecmp +- alloca.h for alloca +- stdio.h for fileno + +The compilation with GCC 15 fails without those with implicit function +declaration error. +--- + +Upstream-PR: https://github.com/Baron-von-Riedesel/JWasm/pull/34 + +diff --git a/src/H/globals.h b/src/H/globals.h +index 2992cc7..607e5f5 100644 +--- a/src/H/globals.h ++++ b/src/H/globals.h +@@ -39,6 +39,7 @@ +
+ #if defined(__UNIX__) || defined(__CYGWIN__) || defined(__DJGPP__) /* avoid for MinGW! */
+
++#include <strings.h>
+ #define _stricmp strcasecmp
+ #ifndef __WATCOMC__
+ #define _memicmp strncasecmp
+diff --git a/src/H/memalloc.h b/src/H/memalloc.h +index d2a8460..7a4e364 100644 +--- a/src/H/memalloc.h ++++ b/src/H/memalloc.h +@@ -44,6 +44,7 @@ extern void MemFree( void *ptr ); +
+ #elif defined(__GNUC__) || defined(__TINYC__)
+
++#include <alloca.h>
+ #define myalloca alloca
+ #ifndef __FreeBSD__ /* added v2.08 */
+ #include <malloc.h> /* added v2.07 */
+diff --git a/src/omf.c b/src/omf.c +index 8d98b1f..d90afae 100644 +--- a/src/omf.c ++++ b/src/omf.c +@@ -62,6 +62,7 @@ +
+ #if TRUNCATE
+ #if defined(__UNIX__) || defined(__CYGWIN__) || defined(__DJGPP__)
++#include <stdio.h>
+ #include <unistd.h>
+ #else
+ #include <io.h>
+-- +2.45.3 + |
