runtime: force XSI strerror on hurd

Change-Id: Icb130bb38daac1a215309f1208fa42d02192381c
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454275
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c
index 13d1d91..8ff5ffb 100644
--- a/libgo/runtime/go-strerror.c
+++ b/libgo/runtime/go-strerror.c
@@ -12,7 +12,7 @@
    exists to selectively undefine it and provides an alias to the
    XSI-compliant version of strerror_r(3).  */
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__gnu_hurd__)
 
 /* Force selection of XSI-compliant strerror_r by glibc.  */
 #undef XOPEN_SOURCE
@@ -21,7 +21,7 @@
 #define _POSIX_C_SOURCE 200112L
 #undef _GNU_SOURCE
 
-#endif /* __linux__ */
+#endif /* defined(__linux__) || defined(__gnu_hurd__) */
 
 #include <string.h>