summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-20 14:00:03 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-20 14:01:11 +0200
commit21c0f8a9843df6822994c047dd0dfa8f61bf05fb (patch)
tree29ccf98a6419053a324ebb913d011244a26493e8
parentf23b3026bc16dc22c333b91bb5fe08c14ba681e4 (diff)
downloadphp-git-21c0f8a9843df6822994c047dd0dfa8f61bf05fb.tar.gz
Fix [-Wundef] warning in Session extension
-rw-r--r--ext/session/mod_files.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 5d5dcb1ca3..bac6c4297d 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -55,11 +55,11 @@
#include <sys/stat.h>
#include <sys/types.h>
-#if HAVE_SYS_FILE_H
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#if HAVE_DIRENT_H
+#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
@@ -71,7 +71,7 @@
#include <fcntl.h>
#include <errno.h>
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -243,7 +243,7 @@ static int ps_files_write(ps_files *data, zend_string *key, zend_string *val)
php_ignore_value(ftruncate(data->fd, 0));
}
-#if defined(HAVE_PWRITE)
+#ifdef HAVE_PWRITE
n = pwrite(data->fd, ZSTR_VAL(val), ZSTR_LEN(val), 0);
#else
lseek(data->fd, 0, SEEK_SET);
@@ -494,7 +494,7 @@ PS_READ_FUNC(files)
*val = zend_string_alloc(sbuf.st_size, 0);
-#if defined(HAVE_PREAD)
+#ifdef HAVE_PREAD
n = pread(data->fd, ZSTR_VAL(*val), ZSTR_LEN(*val), 0);
#else
lseek(data->fd, 0, SEEK_SET);