depot/third_party/nixpkgs/pkgs/servers/sql/mysql/abi-check.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

18 lines
749 B
Diff

MySQL ABI check assumes that with -nostdinc any standard #include terminates
preprocessing, but we do not provide that:
https://github.com/NixOS/nixpkgs/issues/44530
"#error" does not terminate preprocessing, so we #include a non-existent file instead.
--- a/cmake/do_abi_check.cmake
+++ b/cmake/do_abi_check.cmake
@@ -68,1 +68,1 @@ FOREACH(file ${ABI_HEADERS})
- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
+ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include/nostdinc -I${SOURCE_DIR}/include
@@ -74,1 +74,1 @@ FOREACH(file ${ABI_HEADERS})
- COMMAND sed -e "/^# /d"
+ COMMAND sed -e "/^# /d" -e "/^#include <-nostdinc>$/d"
--- /dev/null
+++ b/include/nostdinc/stdint.h
@@ -0,0 +1,1 @@
+#include <-nostdinc>