Skip to content

Commit 52aa677

Browse files
build: set _GNU_SOURCE for Adroid
1 parent 3b5f7c2 commit 52aa677

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ggml/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ endif()
12471247

12481248
# Data types, macros and functions related to controlling CPU affinity and
12491249
# some memory allocation are available on Linux through GNU extensions in libc
1250-
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
1250+
if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
12511251
add_compile_definitions(_GNU_SOURCE)
12521252
endif()
12531253

ggml/src/ggml.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ static int sched_yield (void) {
144144
}
145145
#else
146146

147-
#ifndef __USE_GNU
148-
#define __USE_GNU
149-
#endif
150-
151147
#include <pthread.h>
152148
#include <stdatomic.h>
153149
#include <sched.h>

0 commit comments

Comments
 (0)