Skip to content

Commit 4b55fe5

Browse files
committedApr 18, 2024
8330520: linux clang build fails in os_linux.cpp with static_assert with no message is a C++17 extension
Reviewed-by: stefank, mdoerr
1 parent 5eb2c59 commit 4b55fe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/hotspot/os/linux/os_linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2972,7 +2972,7 @@ void os::pd_commit_memory_or_exit(char* addr, size_t size, bool exec,
29722972
#define MADV_POPULATE_WRITE MADV_POPULATE_WRITE_value
29732973
#else
29742974
// Sanity-check our assumed default value if we build with a new enough libc.
2975-
static_assert(MADV_POPULATE_WRITE == MADV_POPULATE_WRITE_value);
2975+
STATIC_ASSERT(MADV_POPULATE_WRITE == MADV_POPULATE_WRITE_value);
29762976
#endif
29772977

29782978
// Note that the value for MAP_FIXED_NOREPLACE differs between architectures, but all architectures
@@ -2982,7 +2982,7 @@ void os::pd_commit_memory_or_exit(char* addr, size_t size, bool exec,
29822982
#define MAP_FIXED_NOREPLACE MAP_FIXED_NOREPLACE_value
29832983
#else
29842984
// Sanity-check our assumed default value if we build with a new enough libc.
2985-
static_assert(MAP_FIXED_NOREPLACE == MAP_FIXED_NOREPLACE_value, "MAP_FIXED_NOREPLACE != MAP_FIXED_NOREPLACE_value");
2985+
STATIC_ASSERT(MAP_FIXED_NOREPLACE == MAP_FIXED_NOREPLACE_value);
29862986
#endif
29872987

29882988
int os::Linux::commit_memory_impl(char* addr, size_t size,

0 commit comments

Comments
 (0)
Please sign in to comment.