RFR: [8u] JDK-8035949: Remove unused macro USE_SELECT and clean up Unix version of net_util_md.{c,h}
Andrew John Hughes
gnu.andrew at redhat.com
Tue May 5 05:58:45 UTC 2020
On 04/05/2020 14:58, Severin Gehwolf wrote:
> On Thu, 2020-04-30 at 03:00 +0100, Andrew John Hughes wrote:
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8035949
>> Webrev: https://cr.openjdk.java.net/~andrew/openjdk8/8035949/webrev.01/
>>
>> This is the first of two backports to cleanup unused #include directives
>> and dead code in the networking stack. The initial motivation was to
>> resolve build breakage due to the upcoming release of glibc 2.32, which
>> removes the long deprecated sys/sysctl.h [0].
>
> I agree we should fix build issues due to removal of sys/sysctl.h on
> Linux in newer glibc releases. However, rather than backporting two
> patches, I'd suggest to point-fix it. After all, sys/sysctl.h are
> unused includes on Linux:
>
> diff --git a/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/src/solaris/native/java/net/PlainDatagramSocketImpl.c
> --- a/src/solaris/native/java/net/PlainDatagramSocketImpl.c
> +++ b/src/solaris/native/java/net/PlainDatagramSocketImpl.c
> @@ -41,7 +41,6 @@
> #endif
> #ifdef __linux__
> #include <unistd.h>
> -#include <sys/sysctl.h>
> #include <sys/utsname.h>
> #include <netinet/ip.h>
>
> diff --git a/src/solaris/native/java/net/PlainSocketImpl.c b/src/solaris/native/java/net/PlainSocketImpl.c
> --- a/src/solaris/native/java/net/PlainSocketImpl.c
> +++ b/src/solaris/native/java/net/PlainSocketImpl.c
> @@ -43,7 +43,6 @@
> #endif
> #ifdef __linux__
> #include <unistd.h>
> -#include <sys/sysctl.h>
> #endif
>
> #include "jvm.h"
>
> This builds fine for me with a glibc which no longer provides
> sys/sysctl.h and risk seems significantly lower going down this route.
>
> Thoughts?
>
> Thanks,
> Severin
>
I see little risk in this minimal cleanup or I wouldn't have posted it
for review.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list