mirror of
https://github.com/darlinghq/cctools-port.git
synced 2024-11-23 04:09:48 +00:00
Apply workaround for conflicting types when including mach-o headers
This workaround was copied from Darling's `platform-include/mach-o/{fat,loader}.h`
This commit is contained in:
parent
55c3dd7697
commit
55197a7077
@ -42,8 +42,14 @@
|
||||
* and contains the constants for the possible values of these types.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <mach/machine.h>
|
||||
#include <architecture/byte_order.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <mach/machine.h>
|
||||
#include <architecture/byte_order.h>
|
||||
#else
|
||||
typedef int cpu_type_t;
|
||||
typedef int cpu_subtype_t;
|
||||
#endif
|
||||
|
||||
#define FAT_MAGIC 0xcafebabe
|
||||
#define FAT_CIGAM 0xbebafeca /* NXSwapLong(FAT_MAGIC) */
|
||||
|
@ -28,24 +28,30 @@
|
||||
*/
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types
|
||||
* and contains the constants for the possible values of these types.
|
||||
*/
|
||||
#include <mach/machine.h>
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types
|
||||
* and contains the constants for the possible values of these types.
|
||||
*/
|
||||
#include <mach/machine.h>
|
||||
|
||||
/*
|
||||
* <mach/vm_prot.h> is needed here for the vm_prot_t type and contains the
|
||||
* constants that are or'ed together for the possible values of this type.
|
||||
*/
|
||||
#include <mach/vm_prot.h>
|
||||
/*
|
||||
* <mach/vm_prot.h> is needed here for the vm_prot_t type and contains the
|
||||
* constants that are or'ed together for the possible values of this type.
|
||||
*/
|
||||
#include <mach/vm_prot.h>
|
||||
|
||||
/*
|
||||
* <machine/thread_status.h> is expected to define the flavors of the thread
|
||||
* states and the structures of those flavors for each machine.
|
||||
*/
|
||||
#include <mach/machine/thread_status.h>
|
||||
#include <architecture/byte_order.h>
|
||||
/*
|
||||
* <machine/thread_status.h> is expected to define the flavors of the thread
|
||||
* states and the structures of those flavors for each machine.
|
||||
*/
|
||||
#include <mach/machine/thread_status.h>
|
||||
#include <architecture/byte_order.h>
|
||||
#else
|
||||
typedef int cpu_type_t;
|
||||
typedef int cpu_subtype_t;
|
||||
typedef int vm_prot_t;
|
||||
#endif // __APPLE__
|
||||
|
||||
/*
|
||||
* The 32-bit mach header appears at the very beginning of the object file for
|
||||
|
Loading…
Reference in New Issue
Block a user