diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-08-01 13:41:40 +0200 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-08-07 18:44:21 +0200 |
commit | d2ae63c6feffda05eb643520dd851451ee337f53 (patch) | |
tree | 421e8a65642b700c342082f1eeaf32633bd952d1 /java/openjdk11/files | |
parent | java/openjdk8: fix build with clang 19 (diff) |
java/openjdk11: fix build with clang 19
Clang 19 is now more strict about undefined integral expressions used as
constants in enum, which results in errors compiling java/openjdk11,
similar to:
/wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.24-8-1/src/jdk.pack/share/native/common-unpack/constants.h:206:33: error: expression is not an integral constant expression
206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
| ^~~~~~~~
/wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.24-8-1/src/jdk.pack/share/native/common-unpack/constants.h:206:37: note: left shift of negative value -1
206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
| ^
Replace the negative value with ~0u to fix this error.
PR: 280560
Approved by: glewis (maintainer)
MFH: 2024Q3
Diffstat (limited to 'java/openjdk11/files')
-rw-r--r-- | java/openjdk11/files/patch-src_jdk.pack_share_native_common-unpack_constants.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/openjdk11/files/patch-src_jdk.pack_share_native_common-unpack_constants.h b/java/openjdk11/files/patch-src_jdk.pack_share_native_common-unpack_constants.h new file mode 100644 index 000000000000..b9e766070817 --- /dev/null +++ b/java/openjdk11/files/patch-src_jdk.pack_share_native_common-unpack_constants.h @@ -0,0 +1,11 @@ +--- src/jdk.pack/share/native/common-unpack/constants.h.orig 2024-07-27 15:11:22 UTC ++++ src/jdk.pack/share/native/common-unpack/constants.h +@@ -203,7 +203,7 @@ enum { + AO_HAVE_FIELD_FLAGS_HI = 1<<10, + AO_HAVE_METHOD_FLAGS_HI = 1<<11, + AO_HAVE_CODE_FLAGS_HI = 1<<12, +- AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use. ++ AO_UNUSED_MBZ = (~0u)<<13, // options bits reserved for future use. + + #define ARCHIVE_BIT_DO(F) \ + F(AO_HAVE_SPECIAL_FORMATS) \ |