Build warning in jpackage

Yasumasa Suenaga suenaga at oss.nttdata.com
Thu Dec 12 09:31:21 UTC 2019


Hi all,

I tried to build jdk/jdk on Fedora 31 x64, but I saw C++ compiler error as below:

```
In file included from /home/ysuenaga/OpenJDK/jdk/src/jdk.incubator.jpackage/unix/native/libapplauncher/PosixPlatform.cpp:36:
/usr/include/sys/sysctl.h:21:2: error: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror=cpp]
    21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
       |
```


AFAICS sysctl.h provides `sysctl()` and some macros, but they are not used in PosixPlatform.cpp .
In fact, I did not see any error when I remove `#include <sys/sysctl.h>` from it.

Is it bug?
If so, I will file it to JBS and will send review request.


Thanks,

Yasumasa


More information about the core-libs-dev mailing list