Fix Tizen ARMEL Build Failure (#55545)
authorDong-Heon Jung <dheon.jung@samsung.com>
Tue, 13 Jul 2021 18:01:19 +0000 (03:01 +0900)
committerGitHub <noreply@github.com>
Tue, 13 Jul 2021 18:01:19 +0000 (11:01 -0700)
* Fix Tizen ARMEL Build Failure

* Check with MFD_CLOEXEC instead of ARM_SOFTFP

src/coreclr/minipal/Unix/doublemapping.cpp

index a50b326..6e0278e 100644 (file)
 #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)
@@ -32,10 +33,6 @@ static const off_t MaxDoubleMappedSize = 2048ULL*1024*1024*1024;
 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)