diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fs_event/fs_event.h (renamed from src/fs_event.h) | 7 | ||||
| -rw-r--r-- | src/fs_event/fs_event_inotify.c (renamed from src/fs_event.c) | 3 | ||||
| -rw-r--r-- | src/winwrap.c | 9 | ||||
| -rw-r--r-- | src/winwrap.h | 4 |
4 files changed, 13 insertions, 10 deletions
diff --git a/src/fs_event.h b/src/fs_event/fs_event.h index d45d7af..0240e6f 100644 --- a/src/fs_event.h +++ b/src/fs_event/fs_event.h @@ -1,11 +1,12 @@ #pragma once #include <al/str.h> -#include <sys/inotify.h> -#include "socket/socket.h" +#ifndef _WIN32 +#include <sys/inotify.h> +#endif -#include "loop.h" +#include "../loop.h" struct aki_fs_event { s32 fd; diff --git a/src/fs_event.c b/src/fs_event/fs_event_inotify.c index 8edce13..0fc19b4 100644 --- a/src/fs_event.c +++ b/src/fs_event/fs_event_inotify.c @@ -1,6 +1,7 @@ #include <al/log.h> -#include "util/error.h" +#include "../util/error.h" +#include "../socket/socket.h" #include "fs_event.h" diff --git a/src/winwrap.c b/src/winwrap.c index a0a1229..b1ab115 100644 --- a/src/winwrap.c +++ b/src/winwrap.c @@ -9,14 +9,11 @@ void aki_windows_init(void) WSAStartup(MAKEWORD(2,2), &data); ULONG actual_resolution; - NTSTATUS(__stdcall *ZwSetTimerResolution)( - IN ULONG RequestedResolution, IN BOOLEAN Set, OUT PULONG ActualResolution) = ( - NTSTATUS(__stdcall*)(ULONG, BOOLEAN, PULONG))GetProcAddress( - GetModuleHandleW(L"ntdll"), "ZwSetTimerResolution"); + NTSTATUS(__stdcall *ZwSetTimerResolution)(IN ULONG RequestedResolution, IN BOOLEAN Set, OUT PULONG ActualResolution); + ZwSetTimerResolution = (NTSTATUS(__stdcall *)(ULONG, BOOLEAN, PULONG))GetProcAddress(GetModuleHandleW(L"ntdll"), "ZwSetTimerResolution"); ZwSetTimerResolution(1, TRUE, &actual_resolution); - NtDelayExecution = (NTSTATUS(__stdcall*)(BOOL, PLARGE_INTEGER))GetProcAddress( - GetModuleHandleW(L"ntdll"), "NtDelayExecution"); + NtDelayExecution = (NTSTATUS(__stdcall *)(BOOL, PLARGE_INTEGER))GetProcAddress(GetModuleHandleW(L"ntdll"), "NtDelayExecution"); QueryPerformanceFrequency(&performance_frequency); #endif diff --git a/src/winwrap.h b/src/winwrap.h index 83cf7ea..8a6b90d 100644 --- a/src/winwrap.h +++ b/src/winwrap.h @@ -6,7 +6,11 @@ #include <winsock2.h> #include <ws2tcpip.h> #include <io.h> +#define WIN32_NO_STATUS #include <windows.h> +#undef WIN32_NO_STATUS +#include <winternl.h> +#include <ntstatus.h> extern NTSTATUS(__stdcall *NtDelayExecution)(BOOL Alertable, PLARGE_INTEGER DelayInterval); extern LARGE_INTEGER performance_frequency; #endif |