From: Edgar Toernig Date: Sat, 30 Apr 2005 16:51:03 +0000 (-0700) Subject: [PATCH] compat: replace AF_LOCAL with AF_UNIX X-Git-Tag: v0.99~691 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ae200ee594545be43ed9dfb51c9db8e1a014a8f5;p=git.git [PATCH] compat: replace AF_LOCAL with AF_UNIX There's no AF_LOCAL in POSIX --- diff --git a/rsh.c b/rsh.c index af2f47b1..2a52e598 100644 --- a/rsh.c +++ b/rsh.c @@ -48,7 +48,7 @@ int setup_connection(int *fd_in, int *fd_out, char *remote_prog, } } strcpy(posn, " -"); - if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv)) { + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) { return error("Couldn't create socket"); } if (!fork()) { diff --git a/tag.c b/tag.c index f079d83a..406dba2a 100644 --- a/tag.c +++ b/tag.c @@ -26,6 +26,10 @@ int parse_tag(struct tag *item) char type[20]; void *data, *bufptr; unsigned long size; + int typelen, taglen; + unsigned char object[20]; + const char *type_line, *tag_line, *sig_line; + if (item->object.parsed) return 0; item->object.parsed = 1; @@ -37,10 +41,6 @@ int parse_tag(struct tag *item) return error("Object %s not a tag", sha1_to_hex(item->object.sha1)); - int typelen, taglen; - unsigned char object[20]; - const char *type_line, *tag_line, *sig_line; - if (size < 64) return -1; if (memcmp("object ", data, 7) || get_sha1_hex(data + 7, object))