aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-12-14 14:05:44 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-12-18 17:37:49 +0000
commit430ead7025c8f32aa67b6c8d99583bbb68969dbb (patch)
treec7e4c5612911a51111c187e7dbcdbc0c1ede116e
parent4d093f4f688f247642423498be93375d54a2a7fd (diff)
downloadports-430ead7025c8f32aa67b6c8d99583bbb68969dbb.tar.gz
ports-430ead7025c8f32aa67b6c8d99583bbb68969dbb.zip
java/openjdk18: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that java/openjdk18 failed to build with clang 15: /wrkdirs/usr/ports/java/openjdk18/work/jdk18u-jdk-18.0.2-9-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:374:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); ^ /wrkdirs/usr/ports/java/openjdk18/work/jdk18u-jdk-18.0.2-9-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:393:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] (*g_network_address_parse_uri)(proxies[i], 0, ^ /wrkdirs/usr/ports/java/openjdk18/work/jdk18u-jdk-18.0.2-9-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:398:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] phost = (*g_network_address_get_hostname)(conn); ^ /wrkdirs/usr/ports/java/openjdk18/work/jdk18u-jdk-18.0.2-9-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:399:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] pport = (*g_network_address_get_port)(conn); ^ /wrkdirs/usr/ports/java/openjdk18/work/jdk18u-jdk-18.0.2-9-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:435:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] (*g_strfreev)(proxies); ^ This is because clang 15 warns by default about functions without arguments in their prototypes. Fix this by suppressing the warning. PR: 268373 Approved by: portmgr (tcberner) MFH: 2022Q4
-rw-r--r--java/openjdk18/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/java/openjdk18/Makefile b/java/openjdk18/Makefile
index 51251ca1cf65..1b9120750fae 100644
--- a/java/openjdk18/Makefile
+++ b/java/openjdk18/Makefile
@@ -154,6 +154,9 @@ EXTRA_CFLAGS+= -Wno-unused-but-set-parameter
.if ${COMPILER_VERSION} >= 140
EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical
.endif
+.if ${COMPILER_VERSION} >= 150
+EXTRA_CFLAGS+= -Wno-deprecated-non-prototype
+.endif
CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
.endif