I say 'fix' because it's still a bug in MinGW-w64 GCC that we have a builtin fork function, but at least this allows git and git-git to build ok.
33 lines
1018 B
Diff
33 lines
1018 B
Diff
From ee9d4bce029b069e00f154283b174f194103c9f7 Mon Sep 17 00:00:00 2001
|
|
From: martell <martellmalone@gmail.com>
|
|
Date: Mon, 21 Jul 2014 21:11:03 +0100
|
|
Subject: [PATCH 09/16] Change inline definition of fork for mingw64
|
|
|
|
It seems to be a builtin for some reason. The real bug is in GCC
|
|
I think. For mingw-w64, returning a long seems to be correct.
|
|
---
|
|
compat/mingw.h | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/compat/mingw.h b/compat/mingw.h
|
|
index 310f51c..f8844c3 100644
|
|
--- a/compat/mingw.h
|
|
+++ b/compat/mingw.h
|
|
@@ -92,8 +92,13 @@ static inline int symlink(const char *oldpath, const char *newpath)
|
|
{ errno = ENOSYS; return -1; }
|
|
static inline int fchmod(int fildes, mode_t mode)
|
|
{ errno = ENOSYS; return -1; }
|
|
+#ifndef __MINGW64_VERSION_MAJOR
|
|
static inline pid_t fork(void)
|
|
{ errno = ENOSYS; return -1; }
|
|
+#else
|
|
+static inline long fork(void)
|
|
+{ errno = ENOSYS; return -1; }
|
|
+#endif
|
|
static inline unsigned int alarm(unsigned int seconds)
|
|
{ return 0; }
|
|
static inline int fsync(int fd)
|
|
--
|
|
2.1.2
|
|
|