Patch 1471925 - Weak linking support for OSX

This patch causes several symbols in the socket and posix module to be weakly
linked on OSX and disables usage of ftime on OSX. These changes make it possible
to use a binary build on OSX 10.4 on a 10.3 system.
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 08d28a1..f089ecd 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -5,6 +5,18 @@
 #include "structseq.h"
 #include "timefuncs.h"
 
+#ifdef __APPLE__
+#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_FTIME)
+  /*
+   * floattime falls back to ftime when getttimeofday fails because the latter
+   * might fail on some platforms. This fallback is unwanted on MacOSX because
+   * that makes it impossible to use a binary build on OSX 10.4 on earlier
+   * releases of the OS. Therefore claim we don't support ftime.
+   */
+# undef HAVE_FTIME
+#endif
+#endif
+
 #include <ctype.h>
 
 #include <sys/types.h>
@@ -842,6 +854,7 @@
 			return (double)t.tv_sec + t.tv_usec*0.000001;
 #endif /* !GETTIMEOFDAY_NO_TZ */
 	}
+
 #endif /* !HAVE_GETTIMEOFDAY */
 	{
 #if defined(HAVE_FTIME)