mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Fixed windows ad.exe build
This commit is contained in:
parent
0bf682fdbd
commit
b724ae2fe4
2 changed files with 7 additions and 1 deletions
|
|
@ -49,6 +49,12 @@
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef O_LARGEFILE
|
||||||
|
#define MPQ_FILE_OPEN_FLAGS (O_RDONLY | O_BINARY | O_LARGEFILE)
|
||||||
|
#else
|
||||||
|
#define MPQ_FILE_OPEN_FLAGS (O_RDONLY | O_BINARY)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef min
|
#ifndef min
|
||||||
#define min(a, b) ((a < b) ? a : b)
|
#define min(a, b) ((a < b) ? a : b)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ int libmpq_archive_open(mpq_archive *mpq_a, unsigned char *mpq_filename) {
|
||||||
memset(mpq_a->header, 0, sizeof(mpq_header));
|
memset(mpq_a->header, 0, sizeof(mpq_header));
|
||||||
|
|
||||||
/* Check if file exists and is readable */
|
/* Check if file exists and is readable */
|
||||||
fd = _open((char *)mpq_filename, O_RDONLY | O_BINARY | O_LARGEFILE);
|
fd = _open((char *)mpq_filename, MPQ_FILE_OPEN_FLAGS);
|
||||||
if (fd == LIBMPQ_EFILE) {
|
if (fd == LIBMPQ_EFILE) {
|
||||||
return LIBMPQ_EFILE;
|
return LIBMPQ_EFILE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue