diff options
author | Nick Kralevich <nnk@google.com> | 2016-04-17 20:02:04 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2016-04-17 20:02:04 -0700 |
commit | f4a0ad5f0cae0f145229326dbb63c8ac289cbfdb (patch) | |
tree | 35cf71d80c0f563adde3d2405b1c26016db71a0b | |
parent | 8e063a9de11933ab6b9839d67c74aed899743853 (diff) | |
download | sqlite-f4a0ad5f0cae0f145229326dbb63c8ac289cbfdb.tar.gz |
Maybe fix mac build
Mac builds don't have posix_fallocate, so only define this for
Linux builds.
Fixes the following build error:
external/sqlite/dist/sqlite3.c:27063:42: error: use of undeclared
identifier 'posix_fallocate'
{ "fallocate", (sqlite3_syscall_ptr)posix_fallocate, 0 },
Change-Id: Ie530861069d2efbc55bbe1e4e622094798cbe869
-rw-r--r-- | dist/Android.mk | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dist/Android.mk b/dist/Android.mk index 85e08d8..ca7632b 100644 --- a/dist/Android.mk +++ b/dist/Android.mk @@ -12,7 +12,6 @@ LOCAL_PATH:= $(call my-dir) # SQLITE_DEFAULT_AUTOVACUUM=1 causes the databases to be subject to auto-vacuum minimal_sqlite_flags := \ -DNDEBUG=1 \ - -DHAVE_POSIX_FALLOCATE=1 \ -DHAVE_USLEEP=1 \ -DSQLITE_HAVE_ISNAN \ -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \ @@ -31,6 +30,9 @@ minimal_sqlite_flags := \ -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 \ -DSQLITE_SECURE_DELETE +minimal_linux_flags := \ + -DHAVE_POSIX_FALLOCATE=1 \ + device_sqlite_flags := $(minimal_sqlite_flags) \ -DSQLITE_ENABLE_ICU \ -DUSE_PREAD64 \ @@ -46,6 +48,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_CFLAGS += $(device_sqlite_flags) +LOCAL_CFLAGS_linux += $(minimal_linux_flags) LOCAL_SHARED_LIBRARIES := libdl @@ -69,6 +72,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_LDLIBS += -lpthread -ldl LOCAL_CFLAGS += $(minimal_sqlite_flags) +LOCAL_CFLAGS_linux += $(minimal_linux_flags) LOCAL_MODULE:= libsqlite LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host LOCAL_STATIC_LIBRARIES := liblog libutils libcutils @@ -101,6 +105,7 @@ LOCAL_SHARED_LIBRARIES := libsqlite \ LOCAL_STATIC_LIBRARIES := libicuandroid_utils LOCAL_CFLAGS += $(device_sqlite_flags) +LOCAL_CFLAGS_linux += $(minimal_linux_flags) LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) @@ -124,6 +129,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) shell.c LOCAL_CFLAGS += $(minimal_sqlite_flags) \ -DNO_ANDROID_FUNCS=1 +LOCAL_CFLAGS_linux += $(minimal_linux_flags) # sqlite3MemsysAlarm uses LOG() LOCAL_STATIC_LIBRARIES += liblog @@ -143,6 +149,7 @@ include $(BUILD_HOST_EXECUTABLE) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_CFLAGS += $(minimal_sqlite_flags) +LOCAL_CFLAGS_linux += $(minimal_linux_flags) LOCAL_MODULE:= libsqlite_static_minimal LOCAL_SDK_VERSION := 23 include $(BUILD_STATIC_LIBRARY) @@ -151,5 +158,6 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_CFLAGS += $(minimal_sqlite_flags) +LOCAL_CFLAGS_linux += $(minimal_linux_flags) LOCAL_MODULE:= libsqlite_static_minimal include $(BUILD_HOST_STATIC_LIBRARY) |