git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] http-backend: Fix symbol clash on AIX 5.3

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 9, 2009, 18:10 UTC
Message-ID
<1257790237-30850-1-git-send-email-spearce@spearce.org>
Mike says:
Show 10 quoted lines
> > +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>
---
 http-backend.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/http-backend.c b/http-backend.c
index 9021266..646e910 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -209,7 +209,7 @@ static void send_strbuf(const char *type, struct strbuf *buf)
 	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;
@@ -247,28 +247,28 @@ static void get_text_file(char *name)
 {
 	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)
-- 
1.6.5.2.351.g09432
Next: Shawn O. Pearce
Message 1 of 5 in “http-backend: Fix symbol clash on AIX 5.3”
  1. 1/3 http-backend: Fix symbol clash on AIX 5.3Shawn O. Pearce, Nov 9, 2009
  2. 2/3 t5551-http-fetch: Work around some libcurl versionsShawn O. Pearce, Nov 9, 2009
  3. TarmiganNov 9, 2009
  4. 3/3 t5551-http-fetch: Work around broken Accept header in libcurlShawn O. Pearce, Nov 9, 2009
  5. TarmiganNov 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.