run_mig used bare cpp, so cross-test preprocessing saw host
macros, not the target's. Switch to "$CC -E -x c" -- matches
mig.in's production preprocessing.
---
tests/test_lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_lib.sh b/tests/test_lib.sh
index 43ef738..7cbe639 100644
--- a/tests/test_lib.sh
+++ b/tests/test_lib.sh
@@ -38,7 +38,7 @@ run_mig () {
file="$1"
module="$2"
echo "Generating stubs for $module..."
- cpp $file -I$TEST_DIR | $MIGCOM -server $module-server.c -user
$module-user.c -header $module-header.h
+ ${CC:-cc} -E -x c $file -I$TEST_DIR | $MIGCOM -server $module-server.c -user
$module-user.c -header $module-header.h
}
test_module () {
--
2.54.0