]> granicus.if.org Git - libexpat/commitdiff
Windows: Handling missing getpid and headers
authorSebastian Pipping <sebastian@pipping.org>
Mon, 28 Mar 2016 17:21:44 +0000 (19:21 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Mon, 28 Mar 2016 17:21:44 +0000 (19:21 +0200)
expat/lib/xmlparse.c

index 5fdd79a915e85890ccc935b8753dbe3bee265262..c0e8f6e2537250c6d77f8ecfcbe8bbb64bfdc671 100644 (file)
@@ -6,9 +6,14 @@
 #include <string.h>                     /* memset(), memcpy() */
 #include <assert.h>
 #include <limits.h>                     /* UINT_MAX */
+
+#ifdef COMPILING_FOR_WINDOWS
+#define getpid GetCurrentProcessId
+#else
 #include <sys/time.h>                   /* gettimeofday() */
 #include <sys/types.h>                  /* getpid() */
 #include <unistd.h>                     /* getpid() */
+#endif
 
 #define XML_BUILDING_EXPAT 1