Skip to content

Commit ce7e433

Browse files
Fix MinGW build by skipping unsupported tests
1 parent 4889646 commit ce7e433

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

source/tests/dynlink_test/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# Executable name and options
33
#
44

5+
if(MINGW)
6+
message(STATUS "Skipping dynlink_test on MinGW (-rdynamic not supported)")
7+
return()
8+
endif()
9+
510
# Target name
611
set(target dynlink-test)
712
message(STATUS "Test ${target}")

source/tests/metacall_fork_test/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Check if detours are enabled
2+
if(MINGW)
3+
message(STATUS "Skipping metacall_fork_test on MinGW (fork not supported)")
4+
return()
5+
endif()
6+
27
if(NOT OPTION_FORK_SAFE OR NOT OPTION_BUILD_DETOURS)
38
return()
49
endif()

source/tests/metacall_fork_test/source/metacall_fork_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ typedef NTSTATUS(NTAPI *RtlCloneUserProcessPtr)(ULONG ProcessFlags,
7575

7676
typedef long pid_t;
7777

78-
pid_t fork(void);
78+
#ifndef __MINGW32__
79+
typedef long pid_t;
80+
#endif
7981

8082
pid_t fork()
8183
{

0 commit comments

Comments
 (0)