[MLton-commit] r5490
Matthew Fluet
fluet at mlton.org
Thu Mar 29 18:45:45 PST 2007
Ensure that a missing struct sockaddr_storage type is introduced with sufficient size
----------------------------------------------------------------------
U mlton/trunk/runtime/platform/hpux.h
U mlton/trunk/runtime/platform/solaris.h
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/platform/hpux.h
===================================================================
--- mlton/trunk/runtime/platform/hpux.h 2007-03-29 19:46:09 UTC (rev 5489)
+++ mlton/trunk/runtime/platform/hpux.h 2007-03-30 02:45:44 UTC (rev 5490)
@@ -50,7 +50,12 @@
struct sockaddr_in6 {
int dummy; // quell gcc warnings about "struct has no members"
};
-#define sockaddr_storage sockaddr_in
+struct sockaddr_storage {
+ union {
+ struct sockaddr_in sa_in;
+ struct sockaddr_un sa_un;
+ } sa;
+}
#endif
Modified: mlton/trunk/runtime/platform/solaris.h
===================================================================
--- mlton/trunk/runtime/platform/solaris.h 2007-03-29 19:46:09 UTC (rev 5489)
+++ mlton/trunk/runtime/platform/solaris.h 2007-03-30 02:45:44 UTC (rev 5490)
@@ -65,7 +65,6 @@
#endif
/* Solaris 7 does not handle IPv6. */
-
#ifndef AF_INET6
#define AF_INET6 26 /* Internet Protocol, Version 6 */
@@ -74,6 +73,11 @@
struct sockaddr_in6 {
int dummy; // quell gcc warnings about "struct has no members"
};
-#define sockaddr_storage sockaddr_in
+struct sockaddr_storage {
+ union {
+ struct sockaddr_in sa_in;
+ struct sockaddr_un sa_un;
+ } sa;
+}
#endif
More information about the MLton-commit
mailing list