Fix #1528: pack.c build on Win32

This commit is contained in:
Sergey Lyubka committed 2022-04-19 18:46:29 +01:00
1 parent fba9f14b2c
commit 944704a12d
2 files changed
+25 -7

No files matched your search

+9
View File
@@ -24,6 +24,15 @@
#include <string.h>
#include <sys/stat.h>
#if defined(_WIN32)
#undef popen
#undef pclose
#undef snprintf
#define snprintf _snprintf
#define popen(a, b) _popen((a), (b))
#define pclose(a) _pclose(a)
#endif
static const char *code =
"const char *mg_unpack(const char *path, size_t *size, time_t *mtime);\n"
"const char *mg_unlist(size_t no);\n"