]> granicus.if.org Git - check/commitdiff
Define pid_t in check.h if on Windows
authorBranden Archer <b.m.archer4@gmail.com>
Mon, 24 Jul 2017 02:58:44 +0000 (22:58 -0400)
committerBranden Archer <b.m.archer4@gmail.com>
Tue, 25 Jul 2017 02:32:08 +0000 (22:32 -0400)
Windows will need the definition of pid_t for a function
in check.h, and on Windows pid_t is not defined in sys/types.h.

src/check.h.in

index 7a7c76eb4eb5ae9895d86fc74aba5fe0d50bb89e..877114663a81bb7db809ce3fc142af87430a56b2 100644 (file)
@@ -63,6 +63,11 @@ CK_CPPSTART
 
 #include <sys/types.h>
 
+#if _MSC_VER
+/* define pid_t for Windows, as it is needed later */
+#define pid_t int
+#endif /* _MSC_VER */
+
 /*
  * Used to create the linker script for hiding lib-local symbols. Shall
  * be put directly in front of the exported symbol.