summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f640b7)
raw | patch | inline | side by side (parent: 7f640b7)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Nov 2009 15:24:33 +0000 (07:24 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Nov 2009 17:30:01 +0000 (09:30 -0800) |
http-backend: Fix symbol clash on AIX 5.3
Mike says:
> > +static void send_file(const char *the_type, const char *name)
> > +{
>
> I think a symbol clash here is responsible for a build breakage in
> next on AIX 5.3:
>
> CC http-backend.o
> http-backend.c:213: error: conflicting types for `send_file'
> /usr/include/sys/socket.h:676: error: previous declaration of `send_file'
> gmake: *** [http-backend.o] Error 1
So we rename the function send_local_file().
Reported-by: Mike Ralphson <mike.ralphson@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike says:
> > +static void send_file(const char *the_type, const char *name)
> > +{
>
> I think a symbol clash here is responsible for a build breakage in
> next on AIX 5.3:
>
> CC http-backend.o
> http-backend.c:213: error: conflicting types for `send_file'
> /usr/include/sys/socket.h:676: error: previous declaration of `send_file'
> gmake: *** [http-backend.o] Error 1
So we rename the function send_local_file().
Reported-by: Mike Ralphson <mike.ralphson@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-backend.c | patch | blob | history |
diff --git a/http-backend.c b/http-backend.c
index 902126675a04d13aa18a24aea29230433eb0a0b1..646e9108bddbd538f04fc01129214aa8615d5e5a 100644 (file)
--- a/http-backend.c
+++ b/http-backend.c
safe_write(1, buf->buf, buf->len);
}
-static void send_file(const char *the_type, const char *name)
+static void send_local_file(const char *the_type, const char *name)
{
const char *p = git_path("%s", name);
size_t buf_alloc = 8192;
{
select_getanyfile();
hdr_nocache();
- send_file("text/plain", name);
+ send_local_file("text/plain", name);
}
static void get_loose_object(char *name)
{
select_getanyfile();
hdr_cache_forever();
- send_file("application/x-git-loose-object", name);
+ send_local_file("application/x-git-loose-object", name);
}
static void get_pack_file(char *name)
{
select_getanyfile();
hdr_cache_forever();
- send_file("application/x-git-packed-objects", name);
+ send_local_file("application/x-git-packed-objects", name);
}
static void get_idx_file(char *name)
{
select_getanyfile();
hdr_cache_forever();
- send_file("application/x-git-packed-objects-toc", name);
+ send_local_file("application/x-git-packed-objects-toc", name);
}
static int http_config(const char *var, const char *value, void *cb)