[or-cvs] r10883: Apparently, OSX does not define s6_addr32 or s6_addr16. How (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Thu Jul 19 19:50:20 UTC 2007


Author: nickm
Date: 2007-07-19 15:50:20 -0400 (Thu, 19 Jul 2007)
New Revision: 10883

Modified:
   tor/trunk/
   tor/trunk/src/common/compat.h
Log:
 r13838 at catbus:  nickm | 2007-07-19 15:50:16 -0400
 Apparently, OSX does not define s6_addr32 or s6_addr16. How silly.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13838] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h	2007-07-19 19:43:08 UTC (rev 10882)
+++ tor/trunk/src/common/compat.h	2007-07-19 19:50:20 UTC (rev 10883)
@@ -283,6 +283,16 @@
 };
 #endif
 
+#if defined(__APPLE__) || defined(__darwin__)
+/* OSX seems not to define these. */
+#ifndef s6_addr16
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
+#ifndef s6_addr32
+#define s6_addr32 __u6_addr.__u6_addr32
+#endif
+#endif
+
 #if !defined(HAVE_STRUCT_SOCKADDR_IN6)
 struct sockaddr_in6 {
   uint16_t sin6_family; /* XXXX020 right size???? */



More information about the tor-commits mailing list