build: set _GNU_SOURCE for Adroid
This commit is contained in:
parent
3b5f7c2a9b
commit
52aa67723a
2 changed files with 1 additions and 5 deletions
|
@ -1247,7 +1247,7 @@ endif()
|
||||||
|
|
||||||
# Data types, macros and functions related to controlling CPU affinity and
|
# Data types, macros and functions related to controlling CPU affinity and
|
||||||
# some memory allocation are available on Linux through GNU extensions in libc
|
# 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)
|
add_compile_definitions(_GNU_SOURCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -144,10 +144,6 @@ static int sched_yield (void) {
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef __USE_GNU
|
|
||||||
#define __USE_GNU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue