diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-16 16:26:44 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-16 16:31:00 +0100 |
commit | 1bfd7c034553d29b4b345b3f082662aafb5b55ef (patch) | |
tree | f6bcc291bfe798b2e8d1f43a665d0027db631237 /src/skel/crossplatform.h | |
parent | Only include sys/syscall.h when __linux__ is defined (diff) | |
download | re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.tar re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.tar.gz re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.tar.bz2 re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.tar.lz re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.tar.xz re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.tar.zst re3-1bfd7c034553d29b4b345b3f082662aafb5b55ef.zip |
Diffstat (limited to 'src/skel/crossplatform.h')
-rw-r--r-- | src/skel/crossplatform.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 6ea5b11e..9b43bcaf 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -136,7 +136,12 @@ void GetLocalTime_CP(SYSTEMTIME* out); typedef void* HANDLE; #define INVALID_HANDLE_VALUE NULL -#define FindClose(h) closedir((DIR*)h) +#define FindClose(h) \ + do { \ + if (h != nil) \ + closedir((DIR*)h); \ + } while(0) + #define LOCALE_USER_DEFAULT 0 #define DATE_SHORTDATE 0 |