Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions ext/opcache/zend_shared_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
+----------------------------------------------------------------------+
*/

#if defined(__linux__) && defined(HAVE_MEMFD_CREATE)
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
# include <sys/mman.h>
#endif

#include <errno.h>
#include "ZendAccelerator.h"
#include "zend_shared_alloc.h"
Expand All @@ -40,7 +33,7 @@
# include <stdio.h>
#endif

#ifdef HAVE_MPROTECT
#if defined(HAVE_MPROTECT) || defined(HAVE_MEMFD_CREATE)
Copy link
Member

@devnexen devnexen Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was because we did not want to enable memfd_create for FreeBSD.
One possible approach would be to do something like here at configure time.

# include "sys/mman.h"
#endif

Expand Down