diff --git a/simavr/sim/sim_utils.c b/simavr/sim/sim_utils.c index eeb49867c..53f40fd71 100644 --- a/simavr/sim/sim_utils.c +++ b/simavr/sim/sim_utils.c @@ -27,6 +27,20 @@ #include "sim_utils.h" +#ifdef __MINGW32__ +char *strsep(char **stringp, const char *delim) { + char *rv = *stringp; + if (rv) { + *stringp += strcspn(*stringp, delim); + if (**stringp) + *(*stringp)++ = '\0'; + else + *stringp = 0; + } + return rv; +} +#endif + static argv_p argv_realloc( argv_p argv,