Add cross-platform utun_mkdir() wrapper for Windows compatibility
This commit is contained in:
1 parent
de7841f33a
commit
e438e19f9e
3 files changed
+20
-5
No files matched your search
@@ -192,6 +192,15 @@ int get_interface_ipv6_by_index(uint32_t netif_index, int temporary, uint8_t* ad
|
||||
uint32_t get_default_route_netif_index(int family);
|
||||
|
||||
|
||||
// Cross-platform mkdir
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#define utun_mkdir(path, mode) _mkdir(path)
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#define utun_mkdir(path, mode) mkdir(path, mode)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user