| @@ -1,17 +1,26 @@ | | | @@ -1,17 +1,26 @@ |
1 | $NetBSD: patch-include_CppUTest_PlatformSpecificFunctions.h,v 1.1 2018/06/22 15:56:56 schmonz Exp $ | | 1 | $NetBSD: patch-include_CppUTest_PlatformSpecificFunctions.h,v 1.2 2018/12/16 07:02:08 schmonz Exp $ |
2 | | | 2 | |
3 | Expect pid_t from fork() and waitpid(). | | 3 | Expect pid_t from fork() and waitpid(). |
4 | | | 4 | |
5 | --- include/CppUTest/PlatformSpecificFunctions.h.orig 2016-05-25 05:41:47.000000000 +0000 | | 5 | --- include/CppUTest/PlatformSpecificFunctions.h.orig 2016-05-25 05:41:47.000000000 +0000 |
6 | +++ include/CppUTest/PlatformSpecificFunctions.h | | 6 | +++ include/CppUTest/PlatformSpecificFunctions.h |
7 | @@ -33,8 +33,8 @@ TestOutput::WorkingEnvironment PlatformS | | 7 | @@ -28,13 +28,17 @@ |
| | | 8 | #ifndef PLATFORMSPECIFICFUNCTIONS_H_ |
| | | 9 | #define PLATFORMSPECIFICFUNCTIONS_H_ |
| | | 10 | |
| | | 11 | +#ifdef CPPUTEST_HAVE_SYS_TYPES_H |
| | | 12 | +#include <sys/types.h> |
| | | 13 | +#endif |
| | | 14 | + |
| | | 15 | #include "CppUTest/TestOutput.h" |
| | | 16 | TestOutput::WorkingEnvironment PlatformSpecificGetWorkingEnvironment(); |
8 | | | 17 | |
9 | class TestPlugin; | | 18 | class TestPlugin; |
10 | extern void (*PlatformSpecificRunTestInASeperateProcess)(UtestShell* shell, TestPlugin* plugin, TestResult* result); | | 19 | extern void (*PlatformSpecificRunTestInASeperateProcess)(UtestShell* shell, TestPlugin* plugin, TestResult* result); |
11 | -extern int (*PlatformSpecificFork)(void); | | 20 | -extern int (*PlatformSpecificFork)(void); |
12 | -extern int (*PlatformSpecificWaitPid)(int pid, int* status, int options); | | 21 | -extern int (*PlatformSpecificWaitPid)(int pid, int* status, int options); |
13 | +extern pid_t (*PlatformSpecificFork)(void); | | 22 | +extern pid_t (*PlatformSpecificFork)(void); |
14 | +extern pid_t (*PlatformSpecificWaitPid)(int pid, int* status, int options); | | 23 | +extern pid_t (*PlatformSpecificWaitPid)(int pid, int* status, int options); |
15 | | | 24 | |
16 | /* Platform specific interface we use in order to minimize dependencies with LibC. | | 25 | /* Platform specific interface we use in order to minimize dependencies with LibC. |
17 | * This enables porting to different embedded platforms. | | 26 | * This enables porting to different embedded platforms. |