mirror of https://gerrit.osmocom.org/asn1c
windows compatibility; suggested by github.com/sapien2
This commit is contained in:
parent
0afe0735d4
commit
50d52cf5fd
|
@ -13,6 +13,17 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
int mkstemp(char *template) {
|
||||||
|
char *tmpFN = _mktemp(template);
|
||||||
|
if(tmpFN)
|
||||||
|
return open(tmpFN, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE);
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#undef HAVE_MKSTEMPS
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MKSTEMPS
|
#ifdef HAVE_MKSTEMPS
|
||||||
#undef mkstemp
|
#undef mkstemp
|
||||||
#define mkstemp(foo) mkstemps(foo, 0)
|
#define mkstemp(foo) mkstemps(foo, 0)
|
||||||
|
|
Loading…
Reference in New Issue