Git development
 help / color / mirror / Atom feed
* strbuf name conflict on Mac OS
@ 2009-03-31 20:17 Joshua Juran
  2009-03-31 20:24 ` Johannes Schindelin
  2009-03-31 20:26 ` Brian Gernhardt
  0 siblings, 2 replies; 5+ messages in thread
From: Joshua Juran @ 2009-03-31 20:17 UTC (permalink / raw)
  To: git

Apple's OpenTransport.h from Universal Interfaces 3.4.2 defines its  
own struct strbuf, with which git's collides.

Since OpenTransport.h also defines some POSIX constants (such as  
O_NONBLOCK) as enums, it's necessary to include OpenTransport.h from  
fcntl.h (and other affected headers) so as to control the order in  
which the definitions appear in the translation unit.

This is the minimal patch:


diff --git a/strbuf.h b/strbuf.h
index 89bd36e..b8f380e 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -40,6 +40,8 @@

  #include <assert.h>

+#define strbuf git_strbuf
+
  extern char strbuf_slopbuf[];
  struct strbuf {
         size_t alloc;


Josh

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-31 21:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 20:17 strbuf name conflict on Mac OS Joshua Juran
2009-03-31 20:24 ` Johannes Schindelin
2009-03-31 21:36   ` Jay Soffian
2009-03-31 21:57     ` Joshua Juran
2009-03-31 20:26 ` Brian Gernhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox