Merge 13763a2a9b
into d7b31a9d84
This commit is contained in:
commit
d2f376a0f3
5 changed files with 34 additions and 0 deletions
|
@ -36,6 +36,13 @@
|
|||
#include <vector>
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#include <TargetConditionals.h>
|
||||
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
||||
// VisionOS lacks some legacy types definitions
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,13 @@
|
|||
#include <vector>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <TargetConditionals.h>
|
||||
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
||||
// VisionOS lacks some legacy types definitions
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
|
|
@ -2376,6 +2376,13 @@ bool ggml_is_numa(void) {
|
|||
#if defined(__linux__) && defined(__aarch64__)
|
||||
#include <sys/auxv.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
||||
// VisionOS lacks some legacy types definitions
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,6 +15,13 @@
|
|||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
||||
// VisionOS lacks some legacy types definitions
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
#include <TargetConditionals.h>
|
||||
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
||||
// VisionOS lacks some legacy types definitions, stdint.h did not help either
|
||||
typedef unsigned int uint;
|
||||
#endif
|
||||
|
||||
#undef MIN
|
||||
#undef MAX
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue