OSDN Git Service

android: define the macro required by popen
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 24 Aug 2016 15:34:36 +0000 (23:34 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 24 Aug 2016 15:34:36 +0000 (23:34 +0800)
Android 7.0 bionic follows the standard more strictly.

Android.mk

index 27c862b..bb0af3d 100644 (file)
@@ -18,7 +18,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_C_INCLUDES)
 # libasound must be compiled with -fno-short-enums, as it makes extensive
 # use of enums which are often type casted to unsigned ints.
 LOCAL_CFLAGS := \
-       -fPIC -DPIC -D_POSIX_SOURCE \
+       -fPIC -DPIC -D_POSIX_C_SOURCE=2 \
        -DALSA_CONFIG_DIR=\"/system/usr/share/alsa\" \
        -DALSA_PLUGIN_DIR=\"/system/usr/lib/alsa-lib\" \
        -DALSA_DEVICE_DIRECTORY=\"/dev/snd/\" \