golang/golang-1.2-BSD-SVID-SOURCE.patch

19 lines
515 B
Diff
Raw Permalink Normal View History

2014-06-03 15:20:16 +00:00
Index: include/u.h
===================================================================
--- include/u.h.orig
+++ include/u.h
@@ -38,9 +38,12 @@ extern "C" {
# define __MAKECONTEXT_V2_SOURCE 1
# endif
#endif
+#if defined __linux__ || defined __GNU__ || defined __GLIBC__
+#define _DEFAULT_SOURCE 1
+#else
#define _BSD_SOURCE 1
-#define _NETBSD_SOURCE 1 /* NetBSD */
#define _SVID_SOURCE 1
+#endif
#if !defined(__APPLE__) && !defined(__OpenBSD__)
# define _XOPEN_SOURCE 1000
# define _XOPEN_SOURCE_EXTENDED 1