Skip to content

Commit 8f5f614

Browse files
committed
On Cygwin use mmap instead of Windows native allocation functions, which are not fork-safe.
1 parent f5fc109 commit 8f5f614

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver/others/memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7474
#include "common.h"
7575
#include <errno.h>
7676

77-
#ifdef OS_WINDOWS
77+
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)
7878
#define ALLOC_WINDOWS
7979
#ifndef MEM_LARGE_PAGES
8080
#define MEM_LARGE_PAGES 0x20000000
@@ -88,7 +88,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8888
#include <stdio.h>
8989
#include <fcntl.h>
9090

91-
#ifndef OS_WINDOWS
91+
#if !defined(OS_WINDOWS) || defined(OS_CYGWIN_NT)
9292
#include <sys/mman.h>
9393
#ifndef NO_SYSV_IPC
9494
#include <sys/shm.h>

0 commit comments

Comments
 (0)