summary refs log tree commit diff
path: root/pkgs/servers/sql/mysql/abi-check.patch
blob: de45d9c3ea21752e5e7be6a85a866e11ff294ed4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>