Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

fix sysctlt compilation error on FreeBSD #27817

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/pal/src/misc/sysinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ Revision History:

#if HAVE_SYSCONF
// <unistd.h> already included above
#elif HAVE_SYSCTL
#endif
#if HAVE_SYSCTL && not defined(__linux__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please use ! instead of not here and below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

// glibc is deprecating sysctl so we should not use it even if it exist.
#include <sys/sysctl.h>
#else
#endif
#if not HAVE_SYSCONF && not HAVE_SYSCTL
#error Either sysctl or sysconf is required for GetSystemInfo.
#endif

Expand Down