From 21c0f8a9843df6822994c047dd0dfa8f61bf05fb Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 20 May 2020 14:00:03 +0200 Subject: [PATCH] Fix [-Wundef] warning in Session extension --- ext/session/mod_files.c | 10 +++++----- 1 file 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 #include -#if HAVE_SYS_FILE_H +#ifdef HAVE_SYS_FILE_H #include #endif -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #endif @@ -71,7 +71,7 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #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); -- 2.40.0