The Linux-specific <sys/sysctl.h> header and the sysctl function have
been deprecated and will be removed from a future version of glibc.
Compilation against the glibc-2.30 headers results in the following warning:
In file included from ipc.c:10:
/usr/include/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
On NetBSD and FreeBSD, however, we still need to include the header
to get the declaration of sysctlbyname(3).
This patch changes ipc.c to include sys/sysctl.h only if __FreeBSD__ or
__NetBSD__ is defined. Also remove the pointless check for __APPLE__.