projects
/
platform
/
upstream
/
zlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f4d905
)
Avoid warnings when O_CLOEXEC or O_EXCL are not defined.
author
Mark Adler
<madler@alumni.caltech.edu>
Sat, 10 Mar 2012 17:54:08 +0000
(09:54 -0800)
committer
Mark Adler
<madler@alumni.caltech.edu>
Sat, 10 Mar 2012 17:54:08 +0000
(09:54 -0800)
gzlib.c
patch
|
blob
|
history
diff --git
a/gzlib.c
b/gzlib.c
index
4732fcc
..
91c71cd
100644
(file)
--- a/
gzlib.c
+++ b/
gzlib.c
@@
-94,7
+94,12
@@
local gzFile gz_open(path, fd, mode)
const char *mode;
{
gz_statep state;
- int cloexec = 0, exclusive = 0;
+#ifdef O_CLOEXEC
+ int cloexec = 0;
+#endif
+#ifdef O_EXCL
+ int exclusive = 0;
+#endif
/* check input */
if (path == NULL)
@@
-134,12
+139,16
@@
local gzFile gz_open(path, fd, mode)
return NULL;
case 'b': /* ignore -- will request binary anyway */
break;
+#ifdef O_CLOEXEC
case 'e':
cloexec = 1;
break;
+#endif
+#ifdef O_EXCL
case 'x':
exclusive = 1;
break;
+#endif
case 'f':
state->strategy = Z_FILTERED;
break;