diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index ff84b9bb5..ec7d30825 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -1247,7 +1247,7 @@ endif() # Data types, macros and functions related to controlling CPU affinity and # some memory allocation are available on Linux through GNU extensions in libc -if (CMAKE_SYSTEM_NAME MATCHES "Linux") +if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android") add_compile_definitions(_GNU_SOURCE) endif() diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 45dca68d4..fb14471f5 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -144,10 +144,6 @@ static int sched_yield (void) { } #else -#ifndef __USE_GNU -#define __USE_GNU -#endif - #include #include #include