https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86535
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> --- Thanks for providing the gen-sysinfo.go file. I see that cmsghdr is defined in that file. Several function declarations use it. It even has a size of 12 bytes. It's just missing a definition. So I'm convinced that it is in some header file on your system. When I say a header file I don't mean a file in the GCC distribution. I mean a file in /usr/include. I would specifically expect it to be defined in /usr/include/netinet/in.h, or some file #included'd by that one. Can you find the definition under /usr/include and show it to us? Thanks.