* Fix Tizen ARMEL Build Failure
* Check with MFD_CLOEXEC instead of ARM_SOFTFP
#include <assert.h>
#include <limits.h>
#include <errno.h>
-#ifdef TARGET_LINUX
+#if defined(TARGET_LINUX) && !defined(MFD_CLOEXEC)
#include <linux/memfd.h>
#include <sys/syscall.h> // __NR_memfd_create
-#endif // TARGET_LINUX
+#define memfd_create(...) syscall(__NR_memfd_create, __VA_ARGS__)
+#endif // TARGET_LINUX && !MFD_CLOEXEC
#include "minipal.h"
#if defined(TARGET_OSX) && defined(TARGET_AMD64)
static const off_t MaxDoubleMappedSize = UINT_MAX;
#endif
-#ifdef TARGET_LINUX
-#define memfd_create(...) syscall(__NR_memfd_create, __VA_ARGS__)
-#endif // TARGET_LINUX
-
#endif // TARGET_OSX
bool VMToOSInterface::CreateDoubleMemoryMapper(void** pHandle, size_t *pMaxExecutableCodeSize)