[MLton-commit] r5483
Matthew Fluet
fluet at mlton.org
Thu Mar 29 08:39:32 PST 2007
Patch from Nicolas Bertolotti (PolySpace).
- bug-fix-solaris7.patch
This patch is needed to build the MLton runtime when the gcc compiler is
designed to produce code for Solaris 7 because the headers do not provide
the definition for MAP_ANON IPv6.
----------------------------------------------------------------------
U mlton/trunk/runtime/platform/solaris.h
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/platform/solaris.h
===================================================================
--- mlton/trunk/runtime/platform/solaris.h 2007-03-29 16:16:27 UTC (rev 5482)
+++ mlton/trunk/runtime/platform/solaris.h 2007-03-29 16:39:32 UTC (rev 5483)
@@ -57,3 +57,22 @@
#endif
extern char **environ; /* for Posix_ProcEnv_environ */
+
+/* Solaris 7 does not define MAP_ANON and does not handle IPv6 */
+
+#ifndef MAP_ANON
+#define MAP_ANON 0x100 /* map anonymous pages directly */
+#endif
+
+#ifndef AF_INET6
+
+#define AF_INET6 26 /* Internet Protocol, Version 6 */
+#define PF_INET6 AF_INET6
+
+struct sockaddr_in6 {
+ int dummy; // quell gcc warnings about "struct has no members"
+};
+#define sockaddr_storage sockaddr_in
+
+#endif
+
More information about the MLton-commit
mailing list