Include proper headers for sysctlbyname() on Mac OS

According to Xcode documentation[1], sysctlbyname is available on
Mac OS via the same includes as on FreeBSD/DragonFly.

[1] https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/sysctlbyname.3.html

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
Thomas Zander 2015-10-29 14:32:03 +01:00 committed by Erik de Castro Lopo
parent c05b7babed
commit 239843e5c1
1 changed files with 1 additions and 5 deletions

View File

@ -77,15 +77,11 @@ static void disable_avx(FLAC__CPUInfo *info)
#include <machine/cpu.h>
#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
#if defined(__APPLE__)
/* how to get sysctlbyname()? */
#endif
#ifdef FLAC__CPU_IA32
/* these are flags in EDX of CPUID AX=00000001 */
static const unsigned FLAC__CPUINFO_IA32_CPUID_CMOV = 0x00008000;