mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
windows: fix most compilation errors, linker errors and warnings left
This commit is contained in:
@@ -59,6 +59,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_X86_")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
|
||||
|
||||
@@ -17,12 +17,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
#include <freerdp/utils/args.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define __CRYPTO_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock.h>
|
||||
#include "tcp.h"
|
||||
#endif
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#else
|
||||
#define socklen_t int
|
||||
#define close(_fd) closesocket(_fd)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include <freerdp/types.h>
|
||||
|
||||
@@ -26,4 +26,6 @@ add_library(freerdp-rail SHARED ${FREERDP_RAIL_SRCS})
|
||||
|
||||
set_target_properties(freerdp-rail PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION})
|
||||
|
||||
target_link_libraries(freerdp-rail freerdp-utils)
|
||||
|
||||
install(TARGETS freerdp-rail DESTINATION lib)
|
||||
|
||||
@@ -50,4 +50,8 @@ set_target_properties(freerdp-utils PROPERTIES VERSION ${FREERDP_VERSION_FULL} S
|
||||
|
||||
target_link_libraries(freerdp-utils ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(freerdp-utils ws2_32)
|
||||
endif()
|
||||
|
||||
install(TARGETS freerdp-utils DESTINATION lib)
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
|
||||
#include <freerdp/utils/registry.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
static char registry_dir[] = "freerdp";
|
||||
static char registry_file[] = "config.txt";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user