Skip to content

Commit

Permalink
Fix compilation error on OSX for vmap extractor.
Browse files Browse the repository at this point in the history
mkdir(path) for windows
mkdir(path, mode) for other os.

I also added a couple of other fix that may cause some issue on OSX.
For this i consider OSX an "linux" like OS. It may work in 90% of the
cases.
  • Loading branch information
Cyberium committed Jul 31, 2016
1 parent 089740c commit d8d69b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions contrib/vmap_extractor/vmapextract/loadlib/loadlib.h
Expand Up @@ -31,9 +31,9 @@ typedef unsigned __int8 uint8;
#else
#include <stdint.h>
#ifndef uint64_t
#ifdef __linux__
#include <linux/types.h>
#endif
#ifndef _WIN32
#include <linux/types.h>
#endif
#endif
typedef int64_t int64;
typedef int32_t int32;
Expand Down
4 changes: 2 additions & 2 deletions contrib/vmap_extractor/vmapextract/vmapexport.cpp
Expand Up @@ -291,7 +291,7 @@ bool scan_patches(char* scanmatch, std::vector<std::string>& pArchiveNames)
{
sprintf(path, "%s.MPQ", scanmatch);
}
#ifdef __linux__
#ifndef _WIN32
if (FILE* h = fopen64(path, "rb"))
#else
if (FILE* h = fopen(path, "rb"))
Expand Down Expand Up @@ -478,7 +478,7 @@ int main(int argc, char** argv)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Create the working directory
if (mkdir(szWorkDirWmo
#ifdef __linux__
#ifndef _WIN32
, 0711
#endif
))
Expand Down

0 comments on commit d8d69b2

Please sign in to comment.