Index: third_party/sqlite/BUILD.gn |
diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn |
index 76b92153f2292eeacdcfb864fe074e35af5c05c7..395bfa5750f68f323ef952d7792cb591e68c7e22 100644 |
--- a/third_party/sqlite/BUILD.gn |
+++ b/third_party/sqlite/BUILD.gn |
@@ -36,6 +36,7 @@ if (!use_system_sqlite) { |
visibility = [ ":*" ] |
sources = [ |
+ "amalgamation/config.h", |
"amalgamation/sqlite3.c", |
"amalgamation/sqlite3.h", |
] |
@@ -122,15 +123,10 @@ if (!use_system_sqlite) { |
] |
} |
- # SQLite wants to track malloc sizes. On OSX it uses malloc_size(), on |
- # Windows _msize(), elsewhere it handles it manually by enlarging the malloc |
- # and injecting a field. Enable malloc_usable_size() for Linux. |
- # NOTE(shess): Android does _not_ export malloc_usable_size(). |
+ # Pull in config.h on Linux. This allows use of preprocessor macros which |
+ # are not available to the build config. |
if (is_linux) { |
- defines += [ |
- "HAVE_MALLOC_H", |
- "HAVE_MALLOC_USABLE_SIZE", |
- ] |
+ defines += [ "_HAVE_SQLITE_CONFIG_H" ] |
} |
include_dirs = [ "amalgamation" ] |