Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions recipes-core/icedtea/icedtea7-native_2.1.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ SRC_URI[langtools.sha256sum] = "10fee41a0cdd1b166ff78e6426430c76af0f2358d026c181
OPENJDK_CHANGESET = "f89009ada191"
SRC_URI[openjdk.md5sum] = "2bc941373ca4b033c9a25f972eec7858"
SRC_URI[openjdk.sha256sum] = "5efd8e66f18fcbf45527bcc74aa3e6ed11f66bc793c88e3841925c4acb4827ba"

FILESEXTRAPATHS:prepend := "${THISDIR}/openjdk/patches-openjdk-7:"
OPENJDK_PATCHES += "file://0001-fix-gcc14-compatibility.patch;apply=no;subdir=icedtea-2.1.3;striplevel=0"
DISTRIBUTION_PATCHES += "0001-fix-gcc14-compatibility.patch"
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
From e35ea7b43c06ccd5638de1174641ef1320c0be4a Mon Sep 17 00:00:00 2001
From: Matt Brocklehurst <matt@mattbrocklehurst.co.uk>
Date: Sun, 11 Jan 2026 14:13:57 +0000
Subject: [PATCH] jdk: fix GCC 14 compatibility regressions

---
openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c | 4 +++-
openjdk/hotspot/agent/src/os/linux/ps_proc.c | 1 +
openjdk/hotspot/agent/src/os/linux/salibelf.c | 1 +
openjdk/jdk/src/share/instrument/JarFacade.c | 2 +-
openjdk/jdk/src/share/native/sun/java2d/opengl/OGLContext.c | 1 +
openjdk/jdk/share/native/sun/security/jgss/wrapper/GSSLibStub.c | 11 ++++++-----
openjdk/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c | 2 +-
openjdk/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c | 2 +-
8 files changed, 15 insertions(+), 9 deletions(-)

diff --git openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
index 5771fdd5..46a46bac 100644
--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
@@ -23,6 +23,7 @@
*/

#include <jni.h>
+#include <stdlib.h>
#include "libproc.h"

#if defined(x86_64) && !defined(amd64)
@@ -73,7 +74,8 @@ JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_in
(JNIEnv *env, jclass cls) {
jclass listClass;

- if (init_libproc(getenv("LIBSAPROC_DEBUG")) != true) {
+ if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != 1)
+ {
THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
}

diff --git openjdk/hotspot/agent/src/os/linux/ps_proc.c openjdk/hotspot/agent/src/os/linux/ps_proc.c
index 676e88a4..98403724 100644
--- openjdk/hotspot/agent/src/os/linux/ps_proc.c
+++ openjdk/hotspot/agent/src/os/linux/ps_proc.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <errno.h>
#include <sys/ptrace.h>
+#include <sys/wait.h>
#include "libproc_impl.h"

#if defined(x86_64) && !defined(amd64)
diff --git openjdk/hotspot/agent/src/os/linux/salibelf.c openjdk/hotspot/agent/src/os/linux/salibelf.c
index 9634da8b..4df53847 100644
--- openjdk/hotspot/agent/src/os/linux/salibelf.c
+++ openjdk/hotspot/agent/src/os/linux/salibelf.c
@@ -24,6 +24,7 @@

#include "salibelf.h"
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>

extern void print_debug(const char*,...);
diff --git openjdk/jdk/src/share/instrument/JarFacade.c openjdk/jdk/src/share/instrument/JarFacade.c
index 07ae23c2..1472b8c6 100644
--- openjdk/jdk/src/share/instrument/JarFacade.c
+++ openjdk/jdk/src/share/instrument/JarFacade.c
@@ -33,7 +33,7 @@
#endif /* _WIN32 */
#include <string.h>
#include <stdlib.h>
-
+#include <ctype.h>
#include "jni.h"
#include "manifest_info.h"
#include "JarFacade.h"
diff --git openjdk/jdk/src/share/native/sun/java2d/opengl/OGLContext.c openjdk/jdk/src/share/native/sun/java2d/opengl/OGLContext.c
index b9c60046..def48611 100644
--- openjdk/jdk/src/share/native/sun/java2d/opengl/OGLContext.c
+++ openjdk/jdk/src/share/native/sun/java2d/opengl/OGLContext.c
@@ -37,6 +37,7 @@
#include "OGLSurfaceData.h"
#include "GraphicsPrimitiveMgr.h"
#include "Region.h"
+#include "jvm.h"

/**
* The following methods are implemented in the windowing system (i.e. GLX
diff --git openjdk/jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c openjdk/jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
index fa888669..615ad8f0 100644
--- openjdk/jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
+++ openjdk/jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
@@ -26,6 +26,7 @@
#include "sun_security_jgss_wrapper_GSSLibStub.h"
#include "NativeUtil.h"
#include "NativeFunc.h"
+#include <stdint.h>

/* Constants for indicating what type of info is needed for inqueries */
const int TYPE_CRED_NAME = 10;
@@ -97,10 +98,10 @@ Java_sun_security_jgss_wrapper_GSSLibStub_getMechPtr(JNIEnv *env,
(*env)->ReleaseByteArrayElements(env, jbytes, bytes, 0);
}
if (found != JNI_TRUE) {
- checkStatus(env, NULL, GSS_S_BAD_MECH, 0, "[GSSLibStub_getMechPtr]");
- return NULL;
- } else return cOid;
- } else return GSS_C_NO_OID;
+ checkStatus(env, NULL, GSS_S_BAD_MECH, 0, "[GSSLibS/GSStub_getMechPtr]");
+ return 0;
+ } else return (jlong)(uintptr_t) cOid;
+ } else return (jlong)(uintptr_t) GSS_C_NO_OID;
}


@@ -1184,7 +1185,7 @@ Java_sun_security_jgss_wrapper_GSSLibStub_deleteContext(JNIEnv *env,
sprintf(debugBuf, "[GSSLibStub_deleteContext] %ld", (long)contextHdl);
debug(env, debugBuf);

- if (contextHdl == GSS_C_NO_CONTEXT) return GSS_C_NO_CONTEXT;
+ if (contextHdl == GSS_C_NO_CONTEXT) return 0;

/* gss_delete_sec_context(...) => GSS_S_NO_CONTEXT(!) */
major = (*ftab->deleteSecContext)(&minor, &contextHdl, GSS_C_NO_BUFFER);
diff --git openjdk/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c openjdk/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
index fa75aa2d..ed329378 100644
--- openjdk/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
+++ openjdk/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
@@ -216,7 +216,7 @@ Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv)


#define REFLECT_VOID_FUNCTION(name, arglist, paramlist) \
-typedef name##_type arglist; \
+typedef void name ##_type arglist; \
void name arglist \
{ \
static name##_type *name##_ptr = NULL; \
diff --git openjdk/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c openjdk/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c
index 9b3e7061..dcac18f5 100644
--- openjdk/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c
+++ openjdk/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c
@@ -519,7 +519,7 @@ Java_sun_java2d_x11_X11SurfaceData_initSurface(JNIEnv *env, jclass xsd,
xsdo->cData = xsdo->configData->color_data;

XShared_initSurface(env, xsdo, depth, width, height, drawable);
- xsdo->xrPic = NULL;
+ xsdo->xrPic = 0;
#endif /* !HEADLESS */
}

--
2.52.0