mksysinfo: Add #defines for Solaris.

From-SVN: r169345
This commit is contained in:
Ian Lance Taylor 2011-01-28 00:11:23 +00:00
parent b91b9ad43e
commit b47750fee3

View file

@ -24,6 +24,14 @@ set -e
rm -f sysinfo.c
cat > sysinfo.c <<EOF
#include "config.h"
#define _GNU_SOURCE
#if defined(__sun__) && defined(__svr4__)
/* Needed by Solaris header files. */
#define _XOPEN_SOURCE 600
#define _EXTENSIONS_
#endif
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
@ -56,7 +64,7 @@ cat > sysinfo.c <<EOF
#include <unistd.h>
EOF
${CC} -D_GNU_SOURCE -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c
${CC} -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c
echo 'package syscall' > ${OUT}