Skip to content

Commit e351457

Browse files
committed
Fix [-Wundef] warning in Session extension
1 parent 8871616 commit e351457

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/session/mod_files.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
#include <sys/stat.h>
5656
#include <sys/types.h>
5757

58-
#if HAVE_SYS_FILE_H
58+
#ifdef HAVE_SYS_FILE_H
5959
#include <sys/file.h>
6060
#endif
6161

62-
#if HAVE_DIRENT_H
62+
#ifdef HAVE_DIRENT_H
6363
#include <dirent.h>
6464
#endif
6565

@@ -71,7 +71,7 @@
7171
#include <fcntl.h>
7272
#include <errno.h>
7373

74-
#if HAVE_UNISTD_H
74+
#ifdef HAVE_UNISTD_H
7575
#include <unistd.h>
7676
#endif
7777

@@ -243,7 +243,7 @@ static int ps_files_write(ps_files *data, zend_string *key, zend_string *val)
243243
php_ignore_value(ftruncate(data->fd, 0));
244244
}
245245

246-
#if defined(HAVE_PWRITE)
246+
#ifdef HAVE_PWRITE
247247
n = pwrite(data->fd, ZSTR_VAL(val), ZSTR_LEN(val), 0);
248248
#else
249249
lseek(data->fd, 0, SEEK_SET);
@@ -494,7 +494,7 @@ PS_READ_FUNC(files)
494494

495495
*val = zend_string_alloc(sbuf.st_size, 0);
496496

497-
#if defined(HAVE_PREAD)
497+
#ifdef HAVE_PREAD
498498
n = pread(data->fd, ZSTR_VAL(*val), ZSTR_LEN(*val), 0);
499499
#else
500500
lseek(data->fd, 0, SEEK_SET);

0 commit comments

Comments
 (0)