mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +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>
|
||||
#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
|
||||
#define min(a, b) ((a < b) ? a : b)
|
||||
#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));
|
||||
|
||||
/* 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) {
|
||||
return LIBMPQ_EFILE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue