mksysinfo: Add #defines for Solaris.
From-SVN: r169345
This commit is contained in:
parent
b91b9ad43e
commit
b47750fee3
1 changed files with 9 additions and 1 deletions
|
@ -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}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue