Skip to content

Commit

Permalink
Add Availability.h include to fix macOS SDK instrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 authored and aquynh committed Jun 15, 2018
1 parent f770694 commit 36d4585
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions MCInst.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */

#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#include <libkern/libkern.h>
#else
#include <stdio.h>
Expand Down
1 change: 1 addition & 0 deletions SStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <stdarg.h>
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#include <libkern/libkern.h>
#include <i386/limits.h>
#else
Expand Down
1 change: 1 addition & 0 deletions arch/X86/X86ATTInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#endif
#include <capstone/platform.h>
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#include <libkern/libkern.h>
#else
#include <stdio.h>
Expand Down
5 changes: 5 additions & 0 deletions arch/X86/X86Disassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
#endif

#include <capstone/platform.h>

#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#endif

#include <string.h>

#include "../../cs_priv.h"
Expand Down
1 change: 1 addition & 0 deletions arch/X86/X86IntelInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#endif
#include <capstone/platform.h>
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#include <libkern/libkern.h>
#else
#include <stdio.h>
Expand Down
4 changes: 4 additions & 0 deletions arch/X86/X86Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#ifdef CAPSTONE_HAS_X86

#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#endif

#include <string.h>
#ifndef CAPSTONE_HAS_OSXKERNEL
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma warning(disable:28719) // disable MSVC's warning on strcpy()
#endif
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#include <libkern/libkern.h>
#else
#include <stddef.h>
Expand Down
1 change: 1 addition & 0 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */

#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <Availability.h>
#include <libkern/libkern.h>
#else
#include <stdlib.h>
Expand Down

0 comments on commit 36d4585

Please sign in to comment.