+#ifdef HAVE_VISIBILITY_HIDDEN
+#define MPH_INTERNAL __attribute__((visibility("hidden")))
+#else
+#define MPH_INTERNAL
+#endif
+
+#if defined (PLATFORM_WIN32) && !defined (EOVERFLOW)
+#define EOVERFLOW 75
+#endif /* def PLATFORM_WIN32 && ndef EOVERFLOW */
+
+#if !defined (PLATFORM_WIN32)
+
+/*
+ * Solaris doesn't define these BSD values, and if they're not present then
+ * map.c:Mono_Posix_FromSeekFlags() breaks badly; see:
+ * http://bugzilla.gnome.org/show_bug.cgi?id=370081
+ */
+
+#ifndef L_SET
+#define L_SET SEEK_SET
+#endif /* ndef L_SET */
+
+#ifndef L_INCR
+#define L_INCR SEEK_CUR
+#endif /* ndef L_INCR */
+
+#ifndef L_XTND
+#define L_XTND SEEK_END
+#endif /* ndef L_XTND */
+
+/*
+ * XATTR_AUTO is a synonym for 0 within XattrFlags, but most systems don't
+ * define it. map.c doesn't know that, though, so we ensure that it's defined
+ * so that the value 0 round-trips through MonoPosixHelper.
+ */
+
+#ifndef XATTR_AUTO
+#define XATTR_AUTO 0
+#endif /* ndef XATTR_AUTO */
+
+#endif /* ndef PLATFORM_WIN32 */
+