Commit 239843e5 authored by Thomas Zander's avatar Thomas Zander Committed by Erik de Castro Lopo
Browse files

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's avatarErik de Castro Lopo <erikd@mega-nerd.com>
parent c05b7bab
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment