This commit is contained in:
parent
e7785c063a
commit
50d62d4749
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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 20 20:17:41 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -180,6 +180,8 @@ Patch2: 1015432.patch
|
||||
Patch3: java-atk-wrapper-security.patch
|
||||
# Fix use of unintialized memory in adlc parser
|
||||
Patch12: adlc-parser.patch
|
||||
# Fix different integer/pointer type mismatches that are fatal with gcc14
|
||||
Patch13: fix-build-with-gcc14.patch
|
||||
# Avoid triggering inactivity timeout while generating javadoc in zero VM
|
||||
Patch14: zero-javadoc-verbose.patch
|
||||
# Fix detection of jobserver support
|
||||
@ -513,6 +515,7 @@ patch -p0 -i %{PATCH1}
|
||||
patch -p0 -i %{PATCH2}
|
||||
patch -p0 -i %{PATCH3}
|
||||
patch -p0 -i %{PATCH12}
|
||||
patch -p0 -i %{PATCH13}
|
||||
|
||||
%if %{with zero}
|
||||
patch -p0 -i %{PATCH14}
|
||||
|
Loading…
Reference in New Issue
Block a user