summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-12 17:50:35 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-12 22:01:00 +0200
commit1df3f97c215bab21a6dd14a9c2e564dc2dbc3123 (patch)
tree3d928142ab5345a1b0301dab207f104df8f9b1cb /main/main.c
parent3689807998e7202b68babfbdbdb32f0423d4886a (diff)
downloadphp-git-1df3f97c215bab21a6dd14a9c2e564dc2dbc3123.tar.gz
Fix [-Wundef] warning in main folder
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/main.c b/main/main.c
index 59cac41afc..48ef5060bd 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2498,7 +2498,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
{
zend_file_handle *prepend_file_p, *append_file_p;
zend_file_handle prepend_file, append_file;
-#if HAVE_BROKEN_GETCWD
+#ifdef HAVE_BROKEN_GETCWD
volatile int old_cwd_fd = -1;
#else
char *old_cwd;
@@ -2525,7 +2525,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
PG(during_request_startup) = 0;
if (primary_file->filename && !(SG(options) & SAPI_OPTION_NO_CHDIR)) {
-#if HAVE_BROKEN_GETCWD
+#ifdef HAVE_BROKEN_GETCWD
/* this looks nasty to me */
old_cwd_fd = open(".", 0);
#else
@@ -2590,7 +2590,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
} zend_end_try();
}
-#if HAVE_BROKEN_GETCWD
+#ifdef HAVE_BROKEN_GETCWD
if (old_cwd_fd != -1) {
fchdir(old_cwd_fd);
close(old_cwd_fd);