From 49f14d294485c54d9a2c75282be6c7447ac80df5 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Thu, 4 Feb 2016 03:34:09 +0100 Subject: [PATCH] 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. --- src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c | 5 ----- src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.c | 5 ----- 2 files changed, 10 deletions(-) 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; } - - - -- 2.7.4