Skip to content

Commit 37183a1

Browse files
committed
Fix compilation problem on iOS/MacOS
1 parent 9925a2f commit 37183a1

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

erts/emulator/beam/erl_nif.c

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,25 @@
7979
#undef SHMOPEN_USE_POSIX
8080
#undef USE_ERTS_DLOPEN_MEM
8181

82+
#ifdef HAVE_DLFCN_H
83+
#include <dlfcn.h>
84+
#endif
85+
#ifdef HAVE_FCNTL_H
86+
#include <fcntl.h>
87+
#endif
88+
#ifdef HAVE_SYS_MMAN_H
89+
#include <sys/mman.h>
90+
#endif
91+
#ifdef HAVE_SYS_STAT_H
92+
#include <sys/stat.h>
93+
#endif
94+
#ifdef HAVE_SYS_TIME_H
95+
#include <sys/time.h>
96+
#endif
97+
#ifdef HAVE_UNISTD_H
98+
#include <unistd.h>
99+
#endif
82100
#if defined(__linux__)
83-
# include <dlfcn.h>
84-
# include <fcntl.h>
85-
# include <sys/mman.h>
86-
# include <sys/stat.h>
87-
# include <sys/time.h>
88-
# include <unistd.h>
89101
# if defined(__linux__)
90102
# include <sys/syscall.h>
91103
# endif

0 commit comments

Comments
 (0)