Hi,

attached are two patches:
the first fixes some build issues on solaris10/x86 with sunpro (and some
that also happen with gcc), while the second adds a simple way to add
additional search and link paths for curl library and headers.


patrick mauritz
(not on the list, please Cc:)
diff -ur git-core-0.99.4.orig/convert-cache.c git-core-0.99.4/convert-cache.c
--- git-core-0.99.5.orig/convert-cache.c	Wed Aug 17 09:55:00 2005
+++ git-core-0.99.5/convert-cache.c	Wed Aug 17 09:58:48 2005
@@ -1,4 +1,5 @@
 #define _XOPEN_SOURCE /* glibc2 needs this */
+#define __EXTENSIONS__ /* solaris needs this */
 #include <time.h>
 #include <ctype.h>
 #include "cache.h"
diff -ur git-core-0.99.4.orig/ident.c git-core-0.99.4/ident.c
--- git-core-0.99.5.orig/ident.c	Wed Aug 17 09:55:00 2005
+++ git-core-0.99.5/ident.c	Wed Aug 17 09:57:54 2005
@@ -36,12 +36,13 @@
 	memcpy(real_email, pw->pw_name, len);
 	real_email[len++] = '@';
 	gethostname(real_email + len, sizeof(real_email) - len);
+#ifndef __sun
 	if (!strchr(real_email+len, '.')) {
 		len = strlen(real_email);
 		real_email[len++] = '.';
 		getdomainname(real_email+len, sizeof(real_email)-len);
 	}
-
+#endif
 	/* And set the default date */
 	datestamp(real_date, sizeof(real_date));
 	return 0;
--- git-core-0.99.5/Makefile~	Thu Aug 25 03:54:24 2005
+++ git-core-0.99.5/Makefile	Tue Sep  6 01:18:32 2005
@@ -146,7 +146,11 @@
 		endif
 	endif
 endif
+ifeq ($(shell uname -s),SunOS)
+  LIBS += -lsocket
+endif
 
+
 DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
 
 
--- git-core-0.99.5/Makefile~   Tue Sep  6 01:13:29 2005
+++ git-core-0.99.5/Makefile    Tue Sep  6 01:15:40 2005
@@ -34,7 +34,14 @@
 
 GIT_VERSION = 0.99.5
 
-CFLAGS = -g -O2 -Wall
+ifndef COPTS
+COPTS = -g -O2 -Wall
+endif
+CFLAGS = $(COPTS)
+ifdef CURLDIR
+CFLAGS+=-I$(CURLDIR)/include
+endif
+
 ALL_CFLAGS = $(CFLAGS) $(DEFINES)
 
 prefix = $(HOME)
@@ -172,7 +179,11 @@
 git-ssh-pull: rsh.o pull.o
 git-ssh-push: rsh.o
 
+ifdef CURLDIR
+git-http-pull: LIBS += -lcurl -L$(CURLDIR)/lib -R$(CURLDIR)/lib
+else
 git-http-pull: LIBS += -lcurl
+endif
 git-rev-list: LIBS += $(OPENSSL_LIBSSL)
 
 init-db.o: init-db.c

Reply via email to