diff --git a/mingw-w64-git-git/0009-Change-inline-definition-of-fork-for-mingw64.patch b/mingw-w64-git-git/0009-Change-inline-definition-of-fork-for-mingw64.patch new file mode 100644 index 0000000000..eb4a8c0b04 --- /dev/null +++ b/mingw-w64-git-git/0009-Change-inline-definition-of-fork-for-mingw64.patch @@ -0,0 +1,32 @@ +From ee9d4bce029b069e00f154283b174f194103c9f7 Mon Sep 17 00:00:00 2001 +From: martell +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 + diff --git a/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch b/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch deleted file mode 100644 index 2d746aacab..0000000000 --- a/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b8ea7da2f0fcb28a27fedda5dd2fa0cd3005cd73 Mon Sep 17 00:00:00 2001 -From: martell -Date: Mon, 21 Jul 2014 21:11:03 +0100 -Subject: [PATCH 09/16] fix fork for mingw64 - ---- - compat/mingw.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/compat/mingw.h b/compat/mingw.h -index 310f51c..2a626c6 100644 ---- a/compat/mingw.h -+++ b/compat/mingw.h -@@ -92,8 +92,8 @@ 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; } --static inline pid_t fork(void) --{ errno = ENOSYS; return -1; } -+//static inline pid_t fork(void) -+//{ errno = ENOSYS; return -1; } - static inline unsigned int alarm(unsigned int seconds) - { return 0; } - static inline int fsync(int fd) --- -2.1.2 - diff --git a/mingw-w64-git-git/PKGBUILD b/mingw-w64-git-git/PKGBUILD index dccfa899bb..69edeca13c 100644 --- a/mingw-w64-git-git/PKGBUILD +++ b/mingw-w64-git-git/PKGBUILD @@ -39,7 +39,7 @@ source=(${GIT_URL} "0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch" "0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch" "0008-fix-mingw64-compat-wide-char.patch" - "0009-fix-fork-for-mingw64.patch" + "0009-Change-inline-definition-of-fork-for-mingw64.patch" "0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch" "0010-w64-msysgit-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch" "0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch" @@ -60,7 +60,7 @@ md5sums=('SKIP' '9eb74690d5b718b0f7a8859a6848890b' 'fceb0b5804e916de2568e5740eaec316' '668368e7b1f1993280315d9b390a9c66' - '0262e62a499d0a4f72c3c17e22a61c58' + '465210c5a264d13ea0e5f5bb1fd484ff' '7eb3d700b4b8f6fa44f2afae3db99222' '69af98595eeabd892289de06d0cd009f' 'c078ad47d7f3c561223d55315509a7e1' @@ -94,7 +94,7 @@ prepare() { git am "${srcdir}"/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch if [ "${_based_on_dscho_w64_msysgit}" = "no" ]; then git am "${srcdir}"/0008-fix-mingw64-compat-wide-char.patch - git am "${srcdir}"/0009-fix-fork-for-mingw64.patch + git am "${srcdir}"/0009-Change-inline-definition-of-fork-for-mingw64.patch fi if [ "${_based_on_dscho_w64_msysgit}" = "no" ]; then git am "${srcdir}"/0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch diff --git a/mingw-w64-git/0009-Change-inline-definition-of-fork-for-mingw64.patch b/mingw-w64-git/0009-Change-inline-definition-of-fork-for-mingw64.patch new file mode 100644 index 0000000000..eb4a8c0b04 --- /dev/null +++ b/mingw-w64-git/0009-Change-inline-definition-of-fork-for-mingw64.patch @@ -0,0 +1,32 @@ +From ee9d4bce029b069e00f154283b174f194103c9f7 Mon Sep 17 00:00:00 2001 +From: martell +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 + diff --git a/mingw-w64-git/0009-fix-fork-for-mingw64.patch b/mingw-w64-git/0009-fix-fork-for-mingw64.patch deleted file mode 100644 index 2d746aacab..0000000000 --- a/mingw-w64-git/0009-fix-fork-for-mingw64.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b8ea7da2f0fcb28a27fedda5dd2fa0cd3005cd73 Mon Sep 17 00:00:00 2001 -From: martell -Date: Mon, 21 Jul 2014 21:11:03 +0100 -Subject: [PATCH 09/16] fix fork for mingw64 - ---- - compat/mingw.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/compat/mingw.h b/compat/mingw.h -index 310f51c..2a626c6 100644 ---- a/compat/mingw.h -+++ b/compat/mingw.h -@@ -92,8 +92,8 @@ 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; } --static inline pid_t fork(void) --{ errno = ENOSYS; return -1; } -+//static inline pid_t fork(void) -+//{ errno = ENOSYS; return -1; } - static inline unsigned int alarm(unsigned int seconds) - { return 0; } - static inline int fsync(int fd) --- -2.1.2 - diff --git a/mingw-w64-git/PKGBUILD b/mingw-w64-git/PKGBUILD index 645cd347c2..f45bb9b3f8 100644 --- a/mingw-w64-git/PKGBUILD +++ b/mingw-w64-git/PKGBUILD @@ -1,4 +1,5 @@ # Maintainer: Martell Malone +# Maintainer: Ray Donnelly _realname=git @@ -39,7 +40,7 @@ source=("https://github.com/msysgit/git/archive/v$_sillyname.tar.gz" "0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch" "0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch" "0008-fix-mingw64-compat-wide-char.patch" - "0009-fix-fork-for-mingw64.patch" + "0009-Change-inline-definition-of-fork-for-mingw64.patch" "0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch" "0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch" "0012-Use-system-dirent.h-on-MinGW-w64.patch" @@ -58,7 +59,7 @@ md5sums=('0a434ed8b8285419d746ad202216f3b4' '9eb74690d5b718b0f7a8859a6848890b' 'fceb0b5804e916de2568e5740eaec316' '668368e7b1f1993280315d9b390a9c66' - '0262e62a499d0a4f72c3c17e22a61c58' + '465210c5a264d13ea0e5f5bb1fd484ff' '78e1b6c1dd2785b3cba58f236480391a' 'c078ad47d7f3c561223d55315509a7e1' '1aacf732e02da4cb6604b4496ba24ff9' @@ -84,11 +85,11 @@ prepare() { patch -p1 < "${srcdir}"/0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch patch -p1 < "${srcdir}"/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch patch -p1 < "${srcdir}"/0008-fix-mingw64-compat-wide-char.patch - patch -p1 < "${srcdir}"/0009-fix-fork-for-mingw64.patch + patch -p1 < "${srcdir}"/0009-Change-inline-definition-of-fork-for-mingw64.patch patch -p1 < "${srcdir}"/0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch patch -p1 < "${srcdir}"/0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch patch -p1 < "${srcdir}"/0012-Use-system-dirent.h-on-MinGW-w64.patch - patch -p1 < "${srcdir}"/0013-Remove-custom-pthread-layer.patch + patch -p1 < "${srcdir}"/0013-Make-pthread-wrapper-only-for-mingw.patch patch -p1 < "${srcdir}"/0014-Do-not-compile-dirent-on-mingw64.patch patch -p1 < "${srcdir}"/0015-Alter-fscache-for-mingw64.patch patch -p1 < "${srcdir}"/0016-Use-time.h-versions-of-gmtime-localtime-_r.patch