summaryrefslogtreecommitdiff
path: root/devel/cpputest/patches/patch-include_CppUTest_PlatformSpecificFunctions.h
blob: 818060656c7b57f5090035d75f8a2f9bccc56d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-include_CppUTest_PlatformSpecificFunctions.h,v 1.2 2018/12/16 07:02:08 schmonz Exp $

Expect pid_t from fork() and waitpid().

--- include/CppUTest/PlatformSpecificFunctions.h.orig	2016-05-25 05:41:47.000000000 +0000
+++ include/CppUTest/PlatformSpecificFunctions.h
@@ -28,13 +28,17 @@
 #ifndef PLATFORMSPECIFICFUNCTIONS_H_
 #define PLATFORMSPECIFICFUNCTIONS_H_
 
+#ifdef CPPUTEST_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
 #include "CppUTest/TestOutput.h"
 TestOutput::WorkingEnvironment PlatformSpecificGetWorkingEnvironment();
 
 class TestPlugin;
 extern void (*PlatformSpecificRunTestInASeperateProcess)(UtestShell* shell, TestPlugin* plugin, TestResult* result);
-extern int (*PlatformSpecificFork)(void);
-extern int (*PlatformSpecificWaitPid)(int pid, int* status, int options);
+extern pid_t (*PlatformSpecificFork)(void);
+extern pid_t (*PlatformSpecificWaitPid)(int pid, int* status, int options);
 
 /* Platform specific interface we use in order to minimize dependencies with LibC.
  * This enables porting to different embedded platforms.