| upstream report: http://marc.info/?l=git&m=128774216918941&w=2 |
| |
| diff -ru git-1.7.3.1.orig/Makefile git-1.7.3.1/Makefile |
| --- git-1.7.3.1.orig/Makefile 2010-10-22 10:58:17 +0200 |
| +++ git-1.7.3.1/Makefile 2010-10-22 11:17:28 +0200 |
| @@ -1091,6 +1091,25 @@ |
| endif |
| X = .exe |
| endif |
| +ifeq ($(uname_S),Interix) |
| + NO_SYS_POLL_H = YesPlease |
| + NO_INTTYPES_H = YesPlease |
| + NO_INITGROUPS = YesPlease |
| + NO_IPV6 = YesPlease |
| + NO_MEMMEM = YesPlease |
| + NO_MKDTEMP = YesPlease |
| + NO_STRTOUMAX = YesPlease |
| + NO_NSEC = YesPlease |
| + NO_MKSTEMPS = YesPlease |
| + ifeq ($(uname_R),3.5) |
| + NO_INET_NTOP = YesPlease |
| + NO_INET_PTON = YesPlease |
| + endif |
| + ifeq ($(uname_R),5.2) |
| + NO_INET_NTOP = YesPlease |
| + NO_INET_PTON = YesPlease |
| + endif |
| +endif |
| ifneq (,$(findstring MINGW,$(uname_S))) |
| pathsep = ; |
| NO_PREAD = YesPlease |
| @@ -1354,6 +1373,15 @@ |
| ifdef NO_SYS_SELECT_H |
| BASIC_CFLAGS += -DNO_SYS_SELECT_H |
| endif |
| +ifdef NO_SYS_POLL_H |
| + BASIC_CFLAGS += -DNO_SYS_POLL_H |
| +endif |
| +ifdef NO_INTTYPES_H |
| + BASIC_CFLAGS += -DNO_INTTYPES_H |
| +endif |
| +ifdef NO_INITGROUPS |
| + BASIC_CFLAGS += -DNO_INITGROUPS |
| +endif |
| ifdef NO_MMAP |
| COMPAT_CFLAGS += -DNO_MMAP |
| COMPAT_OBJS += compat/mmap.o |
| diff -ru git-1.7.3.1.orig/daemon.c git-1.7.3.1/daemon.c |
| --- git-1.7.3.1.orig/daemon.c 2010-10-22 10:58:11 +0200 |
| +++ git-1.7.3.1/daemon.c 2010-10-22 11:10:21 +0200 |
| @@ -956,7 +956,11 @@ |
| listen_addr, listen_port); |
| |
| if (pass && gid && |
| - (initgroups(pass->pw_name, gid) || setgid (gid) || |
| + ( |
| +#ifndef NO_INITGROUPS |
| + initgroups(pass->pw_name, gid) || |
| +#endif |
| + setgid (gid) || |
| setuid(pass->pw_uid))) |
| die("cannot drop privileges"); |
| |
| diff -ru git-1.7.3.1.orig/git-compat-util.h git-1.7.3.1/git-compat-util.h |
| --- git-1.7.3.1.orig/git-compat-util.h 2010-10-22 10:58:16 +0200 |
| +++ git-1.7.3.1/git-compat-util.h 2010-10-22 11:12:22 +0200 |
| @@ -94,7 +94,11 @@ |
| #include <utime.h> |
| #ifndef __MINGW32__ |
| #include <sys/wait.h> |
| +#ifndef NO_SYS_POLL_H |
| #include <sys/poll.h> |
| +#else |
| +#include <poll.h> |
| +#endif |
| #include <sys/socket.h> |
| #include <sys/ioctl.h> |
| #include <termios.h> |
| @@ -106,7 +110,11 @@ |
| #include <arpa/inet.h> |
| #include <netdb.h> |
| #include <pwd.h> |
| +#ifndef NO_INTTYPES_H |
| #include <inttypes.h> |
| +#else |
| +#include <stdint.h> |
| +#endif |
| #if defined(__CYGWIN__) |
| #undef _XOPEN_SOURCE |
| #include <grp.h> |