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.


Signed-off-by: Erik de Castro Lopo's avatarErik de Castro Lopo <>
parent c05b7bab
......@@ -77,15 +77,11 @@ static void disable_avx(FLAC__CPUInfo *info)
#include <machine/cpu.h>
#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>
#if defined(__APPLE__)
/* how to get sysctlbyname()? */
#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