1.错误重现:
error: use of undeclared identifier 'pread64'
error: use of undeclared identifier 'pwrite64'
error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'
error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'
error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'
error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'
note: expanded from macro 'ArraySize'
error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'
note: expanded from macro 'ArraySize'
warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
note: expanded from macro 'osPread64'
warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
note: expanded from macro 'osPwrite64'
交叉编译报错一般是由于环境缺失造成的,所以补全后即可顺利编译。
3.指定编译参数:
export CC=/usr/local/gcc-4.8.1-for-linux64/bin/x86_64-pc-linux-gcc