diff --git a/gzlib.c b/gzlib.c index fec7fbf7f23371762c2a4291ef91ac4690962b0b..4732fcc0205e8570333651f8aa38920c8ffd33f5 100644 --- a/gzlib.c +++ b/gzlib.c @@ -196,10 +196,13 @@ local gzFile gz_open(path, fd, mode) #endif (state->mode == GZ_READ ? O_RDONLY : - (O_WRONLY | O_CREAT | (exclusive ? O_EXCL : 0) | ( - state->mode == GZ_WRITE ? - O_TRUNC : - O_APPEND))), + (O_WRONLY | O_CREAT | +#ifdef O_EXCL + (exclusive ? O_EXCL : 0) | +#endif + (state->mode == GZ_WRITE ? + O_TRUNC : + O_APPEND))), 0666); if (state->fd == -1) { free(state->path);