From: Kamil Rytarowski Date: Thu, 4 Feb 2016 02:34:09 +0000 (+0100) Subject: Fix build on NetBSD: Stop mixing PAL and system headers in tests X-Git-Tag: accepted/tizen/base/20180629.140029~5667^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49f14d294485c54d9a2c75282be6c7447ac80df5;p=platform%2Fupstream%2Fcoreclr.git Fix build on NetBSD: Stop mixing PAL and system headers in tests Including both system and PAL headers results in clasesh like: In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c:18: In file included from /usr/include/sched.h:37: In file included from /usr/include/sys/sched.h:73: /usr/include/sys/types.h:54:18: error: typedef redefinition with different types ('__int8_t' (aka 'signed char') vs 'char') typedef __int8_t int8_t; ^ /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/inc/pal_mstypes.h:224:16: note: previous definition is here typedef __int8 int8_t; ^ This fixes #2993 "Conflicts with system headers on NetBSD" Thanks to Jan Kotas (Microsoft) for showing the right direction. --- diff --git a/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c b/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c index f6009b9..6b62c05 100644 --- a/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c +++ b/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c @@ -13,9 +13,7 @@ ** **=========================================================*/ -#define _GNU_SOURCE #include -#include int __cdecl main(int argc, char *argv[]) { int ret = FAIL; @@ -102,6 +100,3 @@ int __cdecl main(int argc, char *argv[]) { EXIT: return ret; } - - - diff --git a/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.c b/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.c index b799848..54f0116 100644 --- a/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.c +++ b/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.c @@ -13,9 +13,7 @@ ** **=========================================================*/ -#define _GNU_SOURCE #include -#include int __cdecl main(int argc, char *argv[]) { int ret = FAIL; @@ -98,6 +96,3 @@ int __cdecl main(int argc, char *argv[]) { EXIT: return ret; } - - -