Unbreak the MSVC build:
- unistd.h doesn't exist with MSVC
- inline must be __inline in Microsoft C
- atexit cannot take a function declared as void f(), must be void f(void).
llvm-svn: 130490
diff --git a/llvm/runtime/libprofile/CommonProfiling.c b/llvm/runtime/libprofile/CommonProfiling.c
index 1c1771c..210a5e5 100644
--- a/llvm/runtime/libprofile/CommonProfiling.c
+++ b/llvm/runtime/libprofile/CommonProfiling.c
@@ -19,7 +19,11 @@
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
+#else
+#include <io.h>
+#endif
#include <stdlib.h>
static char *SavedArgs = 0;