2020-11-02 11:55:03 (UTC-03:00)
Marcel Rodrigues <marcelgmr@gmail.com>
Merge pull request #8 from jacobgelling/master Fix Windows runtime error on creat()
diff --git a/gifenc.c b/gifenc.c index 6403152..94c3579 100644 --- a/gifenc.c +++ b/gifenc.c @@ -86,7 +86,11 @@ ge_new_gif( gif->depth = depth > 1 ? depth : 2; gif->frame = (uint8_t *) &gif[1]; gif->back = &gif->frame[width*height]; +#ifdef _WIN32 + gif->fd = creat(fname, S_IWRITE); +#else gif->fd = creat(fname, 0666); +#endif if (gif->fd == -1) goto no_fd; #ifdef _WIN32