https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86535
--- Comment #5 from Ian Lance Taylor <ian at airs dot com> --- Thanks. Unfortunately I don't know why this is failing. Does it help if you edit the file libgo/sysinfo.c to move #include <sys/socket.h> ahead of #include <netinet/in.h> ?