Define `__cdecl` if necessary in coredistools.h.
authorPat Gavlin <pagavlin@microsoft.com>
Wed, 7 Jun 2017 17:28:44 +0000 (10:28 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Wed, 7 Jun 2017 17:41:41 +0000 (10:41 -0700)
This fixes a build break for CoreDisTools on Linux.

Commit migrated from https://github.com/dotnet/coreclr/commit/15d31659309c603e3bb2b748615a86423e62c6b6

src/coreclr/src/inc/coredistools.h

index c73b2f7..5414605 100644 (file)
 #define DllIface EXTERN_C __declspec(dllimport)
 #endif // defined(DllInterfaceExporter)
 #else
+#if !defined(__cdecl)
+#if defined(__i386__)
+#define __cdecl __attribute__((cdecl))
+#else
+#define __cdecl
+#endif
+#endif
 #define DllIface EXTERN_C
 #endif // defined(_MSC_VER)