Skip to contentSkip to conversation

unzip: Fix build with GCC-15

PATCH Trevor Gamblin 1 participant 1 message Jun 18, 2025 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Please disregard this one for now, looks like there may be other issues...

Quoted 64 lines · Trevor Gamblin via lists.openembedded.org

From: Khem Raj <[email protected]>

Add a patch to remove redundant declarations

(From OE-Core rev: 20ae2ce01f5114f6df67c0cfb6d820fc1513cdcc)

Backport this to scarthgap so that it can build on systems with gcc 15 (e.g. Fedora 42).

---
  meta/recipes-extended/unzip/unzip/gcc15.patch | 17 +++++++++++++++++
  meta/recipes-extended/unzip/unzip_6.0.bb      |  1 +
  2 files changed, 18 insertions(+)

create mode 100644 meta/recipes-extended/unzip/unzip/gcc15.patch

meta/recipes-extended/unzip/unzip/gcc15.patch new file +17 -0
new file mode 100644
index 0000000000..42a2f81681
@@ -0,0 +1,17 @@
+Do not redefine gmtime(), localtime()
+
+They are already provided by system time.h header
+
+Upstream-Status: Inactive-Upstream [need a new release]
+
+Sign-off-by: Khem Raj <[email protected]>
+--- a/unix/unxcfg.h
++++ b/unix/unxcfg.h
+@@ -117,7 +117,6 @@ typedef struct stat z_stat;
+ #  endif
+ #else
+ #  include <time.h>
+-   struct tm *gmtime(), *localtime();
+ #endif
+
+ #if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN)))
meta/recipes-extended/unzip/unzip_6.0.bb +1 -1
index c13e7a008e..0a88b4c092 100644
@@ -32,6 +32,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
          file://CVE-2022-0530.patch \
          file://0001-configure-Add-correct-system-headers-and-prototypes-.patch \
          file://0001-unix-configure-fix-detection-for-cross-compilation.patch \
+        file://gcc15.patch \
  "
  UPSTREAM_VERSION_UNKNOWN = "1"
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#219008): https://lists.openembedded.org/g/openembedded-core/message/219008
Mute This Topic: https://lists.openembedded.org/mt/113707386/7611679
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-