Skip to content

Commit 3687647

Browse files
committed
ext/opcache/shared_alloc_mmap: add missing includes for MAXPATHLEN, getpid()
1 parent 001ad5e commit 3687647

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/opcache/shared_alloc_mmap.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
#ifdef USE_MMAP
2525

26+
#if defined(__linux__)
27+
# include "ZendAccelerator.h" // for MAXPATHLEN
28+
#endif
29+
2630
#include <sys/types.h>
2731
#include <sys/stat.h>
2832
#include <stdio.h>
@@ -38,6 +42,10 @@
3842
#include <sys/procctl.h>
3943
#endif
4044

45+
#if defined(__FreeBSD__) || (defined(HAVE_PROCCTL) && defined(PROC_WXMAP_CTL))
46+
# include <unistd.h> // for getpid()
47+
#endif
48+
4149
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
4250
# define MAP_ANONYMOUS MAP_ANON
4351
#endif

0 commit comments

Comments
 (0)