winpr: fix build on Windows with unit tests
This commit is contained in:
parent
0fb3bf1dfd
commit
4f4603133e
@ -33,6 +33,6 @@ set(${MODULE_PREFIX}_SRCS
|
||||
|
||||
winpr_module_add(${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(BUILD_TESTING)
|
||||
if(BUILD_TESTING AND UNIX AND NOT WIN32)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -90,9 +90,10 @@ int TestGetCommState(int argc, char* argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
hComm = CreateFile("COM1",
|
||||
hComm = CreateFileA("COM1",
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
0, NULL, OPEN_EXISTING, 0, NULL);
|
||||
|
||||
if (hComm == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
printf("CreateFileA failure: 0x%x\n", GetLastError());
|
||||
|
@ -19,7 +19,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
#include <winpr/comm.h>
|
||||
#include <winpr/crt.h>
|
||||
|
@ -19,7 +19,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
#include <winpr/comm.h>
|
||||
#include <winpr/crt.h>
|
||||
|
@ -19,7 +19,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
#include <winpr/comm.h>
|
||||
#include <winpr/crt.h>
|
||||
|
@ -20,6 +20,10 @@ winpr_module_add(
|
||||
crypto.h
|
||||
cert.c)
|
||||
|
||||
if(WIN32)
|
||||
winpr_library_add(crypt32)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user