summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2017-10-02 13:42:58 +0000
committerNikita Popov <nikita.ppv@gmail.com>2017-12-16 17:20:05 +0100
commit14393b5fb3713fd322fc98d899b14297088a88e9 (patch)
treeae7803b87df8781ef0e8aa5d7cb25287d9de0c9c /sapi
parent8a179fa02b50685fba47e7d19af922b07791d616 (diff)
downloadphp-git-14393b5fb3713fd322fc98d899b14297088a88e9.tar.gz
Move includes in ps_title.c
The HAVE_UNISTD_H check has to be after including config.h. Also include sys/types.h, which may be needed for setproctitle.
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cli/ps_title.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c
index 303115f7bc..7b00348be6 100644
--- a/sapi/cli/ps_title.c
+++ b/sapi/cli/ps_title.c
@@ -28,16 +28,6 @@
* The following code is adopted from the PostgreSQL's ps_status(.h/.c).
*/
-#include "ps_title.h"
-#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
#ifdef PHP_WIN32
#include "config.w32.h"
#include <windows.h>
@@ -48,6 +38,17 @@
extern char** environ;
#endif
+#include "ps_title.h"
+#include <stdio.h>
+
+#ifdef HAVE_UNISTD_H
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
#ifdef HAVE_SYS_PSTAT_H
#include <sys/pstat.h> /* for HP-UX */
#endif