Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit af0968b

Browse files
adrpoOpenModelica-Hudson
authored andcommitted
fix windows build
Belonging to [master]: - #2127
1 parent 177b914 commit af0968b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

SimulationRuntime/c/util/omc_msvc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static OMC_INLINE int dladdr(void *addr, Dl_info *info) {
184184

185185
#if defined(_MSC_VER)
186186

187-
#include <win32_dirent.h>
187+
#include <windows.h>
188188
#if !defined(PATH_MAX)
189189
#define PATH_MAX MAX_PATH
190190
#endif

SimulationRuntime/c/util/utility.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ void OpenModelica_updateUriMapping(threadData_t *threadData, void *namesAndDirs)
151151
}
152152

153153
#include <sys/stat.h>
154+
155+
#if defined(_MSC_VER)
156+
#define stat _stat
157+
#else
154158
#include <unistd.h>
159+
#endif
155160

156161
static const char *PATH_NOT_IN_FMU_RESOURCES = "Returning path (%s) not in the resources directory. The FMU might not work as expected if you send it to a different system";
157162

0 commit comments

Comments
 (0)