Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235833

PosixPlatform.cpp should not include sysctl.h

    Details

    • Subcomponent:
    • Introduced In Version:
      14
    • Resolved In Build:
      b03

      Backports

        Description

        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."
              |
        ```

        sysctl.h provides `sysctl()` and some macros, but they are not used in PosixPlatform.cpp .

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ysuenaga Yasumasa Suenaga
                  Reporter:
                  ysuenaga Yasumasa Suenaga
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: