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

Re: [BUG] imap-send.c fails to build on OSX

From
Shawn Pearce <spearce@spearce.org>
Date
Mar 13, 2006, 04:25 UTC
Message-ID
<20060313042552.GA18136@spearce.org>
In-Reply-To
<863bhnlo3r.fsf@blue.stonehenge.com>
Workarounds for compiling on MacOS X.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 "Randal L. Schwartz" <merlyn@stonehenge.com> wrote:
 > 
 >     gcc -o imap-send.o -c -g -O2 -Wall -I/sw/include -I/opt/local/include -DSHA1_HEADER='<openssl/sha.h>'  imap-send.c
 >     imap-send.c:376: error: static declaration of 'vasprintf' follows non-static declaration
 >     /usr/include/stdio.h:297: error: previous declaration of 'vasprintf' was here
 >     make: *** [imap-send.o] Error 1
 This should fix the build issues on Mac OS X.  Not tested on other
 (possibly) more important platforms, like Linux.  :-)
 generate-cmdlist.sh |    2 +-
 imap-send.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

base 57f4a482a7fc31e31cafd31fe23f4a4779b2c2f0 last 6854050e1cdaf1b7ab352e1d4757ff5b29a5db93

diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 6ee85d5..76ba49c 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -42,7 +42,7 @@ EOF
 while read cmd
 do
     sed -n "/NAME/,/git-$cmd/H;
-	    \$ {x; s/.*git-$cmd - \\(.*\\)/  {\"$cmd\", \"\1\"},/; p}" \
+	    \$ {x; s/.*git-$cmd - \\(.*\\)/  {\"$cmd\", \"\1\"},/; p;}" \
 	"Documentation/git-$cmd.txt"
 done
 echo "};"
diff --git a/imap-send.c b/imap-send.c
index fddaac0..376929f 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -370,7 +370,7 @@ free_generic_messages( message_t *msgs )
 	}
 }
 
-static int
+int
 vasprintf( char **strp, const char *fmt, va_list ap )
 {
 	int len;
-- 
1.2.4.g806b
Previous: Randal L. SchwartzNext: Randal L. Schwartz
Message 3 of 5 in “[BUG] imap-send.c fails to build on OSX”
  1. Randal L. SchwartzMar 12, 2006
  2. Randal L. SchwartzMar 12, 2006
  3. Shawn PearceMar 13, 2006
  4. Randal L. SchwartzMar 13, 2006
  5. Shawn PearceMar 13, 2006

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.