Fix the build flags.
In Android, "CPPFLAGS" are only for C++, so these weren't getting used.
Change-Id: I773e380a150ec11a0405c3e65d020fb901d9d076
diff --git a/Android.mk b/Android.mk
index 6878e8a..0f53ed9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -14,17 +14,17 @@
LOCAL_PATH := $(call my-dir)
-rootdev_CPPFLAGS := -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
- -D_LARGEFILE64_SOURCE
-
-rootdev_CFLAGS := -Wall -Werror -Wno-sign-compare
+rootdev_CFLAGS := \
+ -D_BSD_SOURCE \
+ -D_FILE_OFFSET_BITS=64 \
+ -D_LARGEFILE_SOURCE \
+ -Wall -Werror -Wno-sign-compare \
# Build the shared library.
include $(CLEAR_VARS)
LOCAL_MODULE := librootdev
LOCAL_CFLAGS += $(rootdev_CFLAGS)
LOCAL_CLANG := true
-LOCAL_CPPFLAGS += $(rootdev_CPPFLAGS)
LOCAL_SRC_FILES := rootdev.c
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
@@ -34,7 +34,6 @@
LOCAL_MODULE := rootdev
LOCAL_CFLAGS += $(rootdev_CFLAGS)
LOCAL_CLANG := true
-LOCAL_CPPFLAGS += $(rootdev_CPPFLAGS)
LOCAL_SHARED_LIBRARIES := librootdev
LOCAL_SRC_FILES := main.c
include $(BUILD_EXECUTABLE)