forked from pool/java-1_8_0-openj9
Accepting request 1172261 from Java:Factory
fix build with gcc 14 OBS-URL: https://build.opensuse.org/request/show/1172261 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/java-1_8_0-openj9?expand=0&rev=25
This commit is contained in:
commit
1c26a3f52e
87
fix-build-with-gcc14.patch
Normal file
87
fix-build-with-gcc14.patch
Normal file
@ -0,0 +1,87 @@
|
||||
--- openjdk/jdk/src/share/bin/splashscreen_stubs.c
|
||||
+++ openjdk/jdk/src/share/bin/splashscreen_stubs.c
|
||||
@@ -61,11 +61,11 @@ typedef char* (*SplashGetScaledImageName_t)(const char* fileName,
|
||||
#define INVOKEV(name) _INVOKE(name, ,;)
|
||||
|
||||
int DoSplashLoadMemory(void* pdata, int size) {
|
||||
- INVOKE(SplashLoadMemory, NULL)(pdata, size);
|
||||
+ INVOKE(SplashLoadMemory, 0)(pdata, size);
|
||||
}
|
||||
|
||||
int DoSplashLoadFile(const char* filename) {
|
||||
- INVOKE(SplashLoadFile, NULL)(filename);
|
||||
+ INVOKE(SplashLoadFile, 0)(filename);
|
||||
}
|
||||
|
||||
void DoSplashInit(void) {
|
||||
@@ -87,4 +87,4 @@ void DoSplashSetScaleFactor(float scaleFactor) {
|
||||
char* DoSplashGetScaledImageName(const char* fileName, const char* jarName,
|
||||
float* scaleFactor) {
|
||||
INVOKE(SplashGetScaledImageName, NULL)(fileName, jarName, scaleFactor);
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--- openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
|
||||
+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
|
||||
@@ -2850,14 +2850,14 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
pb = &data->pixelBuf;
|
||||
|
||||
if (setPixelBuffer(env, pb, buffer) == NOT_OK) {
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
return data->abortFlag; // We already threw an out of memory exception
|
||||
}
|
||||
|
||||
// Allocate a 1-scanline buffer
|
||||
scanLinePtr = (JSAMPROW)malloc(scanLineSize);
|
||||
if (scanLinePtr == NULL) {
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
JNU_ThrowByName( env,
|
||||
"java/lang/OutOfMemoryError",
|
||||
"Writing JPEG Stream");
|
||||
@@ -2879,7 +2879,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
JNU_ThrowByName(env, "javax/imageio/IIOException", buffer);
|
||||
}
|
||||
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
free(scanLinePtr);
|
||||
return data->abortFlag;
|
||||
}
|
||||
@@ -2928,7 +2928,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
(*env)->ReleaseIntArrayElements(env, QtableSelectors, qsels, JNI_ABORT);
|
||||
}
|
||||
if (!success) {
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
free(scanLinePtr);
|
||||
return data->abortFlag;
|
||||
}
|
||||
@@ -2949,7 +2949,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
if (GET_ARRAYS(env, data,
|
||||
(const JOCTET **)(&dest->next_output_byte)) == NOT_OK) {
|
||||
(*env)->ExceptionClear(env);
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
free(scanLinePtr);
|
||||
JNU_ThrowByName(env,
|
||||
"javax/imageio/IIOException",
|
||||
@@ -2987,7 +2987,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
scanData = (*env)->GetIntArrayElements(env, scanInfo, NULL);
|
||||
if (scanData == NULL) {
|
||||
RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte));
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
free(scanLinePtr);
|
||||
return data->abortFlag;
|
||||
}
|
||||
@@ -3086,7 +3086,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
jpeg_abort((j_common_ptr)cinfo);
|
||||
}
|
||||
|
||||
- freeArray(scale, numBands);
|
||||
+ freeArray((void**)scale, numBands);
|
||||
free(scanLinePtr);
|
||||
RELEASE_ARRAYS(env, data, NULL);
|
||||
return data->abortFlag;
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 6 17:41:21 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* fix-build-with-gcc14.patch
|
||||
+ fix build with gcc14
|
||||
+ pointer/integer type precision
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 7 12:44:28 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -115,7 +115,9 @@ Patch4: libdwarf-fix.patch
|
||||
# Fix narrowing conversion error
|
||||
Patch5: openj9-no-narrowing.patch
|
||||
# Fix build with gcc 13
|
||||
Patch32: stringop-overflow.patch
|
||||
Patch31: stringop-overflow.patch
|
||||
# Fix build with gcc 14
|
||||
Patch32: fix-build-with-gcc14.patch
|
||||
# Patches for system libraries
|
||||
Patch201: system-libjpeg.patch
|
||||
Patch202: system-libpng.patch
|
||||
@ -358,6 +360,7 @@ rm -rvf jdk/src/share/native/sun/java2d/cmm/lcms/lcms2*
|
||||
%patch -P 4 -p1
|
||||
%patch -P 5 -p1
|
||||
|
||||
%patch -P 31 -p1
|
||||
%patch -P 32 -p1
|
||||
|
||||
cat %{SOURCE100} \
|
||||
|
Loading…
Reference in New Issue
Block a user