Skip to content

Commit 0a01fd3

Browse files
fmzfmz
authored and
fmz
committed
Fix Android bulid issue
1 parent 86f4a02 commit 0a01fd3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ggml/src/ggml.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ static int sched_yield (void) {
118118
return 0;
119119
}
120120
#else
121+
122+
#ifndef __USE_GNU
123+
#define __USE_GNU
124+
#endif
125+
121126
#include <pthread.h>
122127
#include <stdatomic.h>
128+
#include <sched.h>
123129

124130
typedef void * thread_ret_t;
125131

@@ -18800,11 +18806,6 @@ static bool __thread_priority(int32_t prio) {
1880018806

1880118807
#else // posix?
1880218808

18803-
#ifndef __USE_GNU
18804-
#define __USE_GNU
18805-
#endif
18806-
#include <sched.h>
18807-
1880818809
static bool __thread_affinity(const bool * mask) {
1880918810
cpu_set_t cpuset;
1881018811
int32_t err;

0 commit comments

Comments
 (0)