[PATCH] Portability fix for Solaris 10/x86
* getdomainname unavailable there. * needs -lsocket for linkage. * needs __EXTENSIONS__ at the beginning of convert-objects.c [JC: I've done this slightly differently from what Patrick originally sent to the list and dropped the bit that deals with installations that has curl header and library at non-default location. I am resisting the slipperly slope called autoconf.] Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
215a7ad1ef
commit
f0ebff0dfe
3
ident.c
3
ident.c
@ -36,12 +36,13 @@ int setup_ident(void)
|
||||
memcpy(real_email, pw->pw_name, len);
|
||||
real_email[len++] = '@';
|
||||
gethostname(real_email + len, sizeof(real_email) - len);
|
||||
#ifndef NO_GETDOMAINNAME
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user