mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 08:55:48 +00:00
Fix build and build warnings
This commit is contained in:
parent
794a428f3a
commit
d751c44c3d
@ -4,7 +4,10 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
#include <Winsock2.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
@ -1,8 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "Limelight.h"
|
||||
#include "Platform.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#define SetLastSocketError(x) WSASetLastError(x)
|
||||
#define LastSocketError() WSAGetLastError()
|
||||
@ -10,7 +12,11 @@
|
||||
#ifdef LC_WINDOWS_PHONE
|
||||
#undef WINAPI_FAMILY
|
||||
#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
|
||||
#endif
|
||||
|
||||
#include <WinSock2.h>
|
||||
|
||||
#ifdef LC_WINDOWS_PHONE
|
||||
#undef WINAPI_FAMILY
|
||||
#define WINAPI_FAMILY WINAPI_FAMILY_PHONE_APP
|
||||
#endif
|
||||
|
@ -23,6 +23,21 @@ typedef struct _PLT_EVENT {
|
||||
#error Unsupported platform
|
||||
#endif
|
||||
|
||||
#ifdef LC_WINDOWS_PHONE
|
||||
WINBASEAPI
|
||||
_Ret_maybenull_
|
||||
HANDLE
|
||||
WINAPI
|
||||
CreateThread(
|
||||
_In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
||||
_In_ SIZE_T dwStackSize,
|
||||
_In_ LPTHREAD_START_ROUTINE lpStartAddress,
|
||||
_In_opt_ __drv_aliasesMem LPVOID lpParameter,
|
||||
_In_ DWORD dwCreationFlags,
|
||||
_Out_opt_ LPDWORD lpThreadId
|
||||
);
|
||||
#endif
|
||||
|
||||
int PltCreateMutex(PLT_MUTEX *mutex);
|
||||
void PltDeleteMutex(PLT_MUTEX *mutex);
|
||||
void PltLockMutex(PLT_MUTEX *mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user