Fix building against libjpeg-turbo 1.4 beta

It removed the FAR macro which was causing the build to fail.
This commit is contained in:
Omair Majid 2014-10-31 19:37:33 -04:00
parent 3f33df5ba3
commit 4207bc838a
2 changed files with 38 additions and 0 deletions

View File

@ -578,6 +578,7 @@ Patch7: include-all-srcs.patch
# Problem discovered with make 4.0
Patch11: hotspot-build-j-directive.patch
Patch12: removeSunEcProvider-RH1154143.patch
Patch13: libjpeg-turbo-1.4-compat.patch
#
# OpenJDK specific patches
@ -858,6 +859,7 @@ sh %{SOURCE12}
%patch7
%patch11
%patch12
%patch13
# s390 build fixes
%ifarch s390
@ -1500,6 +1502,9 @@ end
%{files_accessibility %{nil}}
%changelog
* Fri Oct 31 2014 Omair Majid <omajid@redhat.com> - 1:1.8.0.40-13.b02
- Build against libjpeg-turbo-1.4
* Fri Oct 24 2014 Jiri Vanek <jvanek@redhat.com> - 1:1.8.0.40-13.b02
- preparing for parallel debug+normal build
- files and scripelts moved to extendable macros as first step to dual build

View File

@ -0,0 +1,33 @@
Remove uses of FAR in jpeg code
Upstream libjpeg-trubo removed the (empty) FAR macro:
http://sourceforge.net/p/libjpeg-turbo/code/1312/
Adjust our code to not use the undefined FAR macro anymore.
diff --git a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
--- jdk8/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+++ jdk8/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
@@ -1385,7 +1385,7 @@
/* and fill it in */
dst_ptr = icc_data;
for (seq_no = first; seq_no < last; seq_no++) {
- JOCTET FAR *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN;
+ JOCTET *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN;
unsigned int length =
icc_markers[seq_no]->data_length - ICC_OVERHEAD_LEN;
diff --git a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c
--- jdk8/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c
+++ jdk8/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c
@@ -41,9 +41,8 @@
#include "jni.h"
#include "jni_util.h"
-/* undo "system_boolean" hack and undef FAR since we don't use it anyway */
+/* undo "system_boolean" hack since we don't use it anyway */
#undef boolean
-#undef FAR
#include <jpeglib.h>
#include "jerror.h"