HomeFreeBSD

java/openjdk11: fix build with clang 19

Description

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

(cherry picked from commit d2ae63c6feffda05eb643520dd851451ee337f53)

Details

Provenance
dimAuthored on Aug 1 2024, 11:41 AM
Parents
R11:81c40ab2f6ae: java/openjdk8: fix build with clang 19
Branches
Unknown
Tags
Unknown