安装nginx时关系依赖库openssl.lib时,出现:error: 'NR_syscalls' undeclared (first use in this function)
解决方案:根据arch/x86/include/asm/unistd.h的内容
#ifndef _ASM_X86_UNISTD_32_H
#define _ASM_X86_UNISTD_32_H
/*
* This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
......
//参考网址:http://bbs.chinaunix.net/thread-1950577-1-1.html
......
#define __NR_signalfd4 327
define __ARCH_WANT_SYS_OLDUMOUNT
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#ifndef cond_syscall
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif
#endif /* __KERNEL__ */
#endif /* _ASM_X86_UNISTD_32_H */
找到出问题的代码:打开进行编辑,其中按照上述的代码,进行宏定义即可
如出现问题的是未申明__NR_syslog:
在该C文件中添加相关宏定义。
#define __NR_syslog 103
重新编译即可。。。
解决方案:根据arch/x86/include/asm/unistd.h的内容
#ifndef _ASM_X86_UNISTD_32_H
#define _ASM_X86_UNISTD_32_H
/*
* This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
......
//参考网址:http://bbs.chinaunix.net/thread-1950577-1-1.html
......
#define __NR_signalfd4 327
define __ARCH_WANT_SYS_OLDUMOUNT
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#ifndef cond_syscall
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif
#endif /* __KERNEL__ */
#endif /* _ASM_X86_UNISTD_32_H */
找到出问题的代码:打开进行编辑,其中按照上述的代码,进行宏定义即可
如出现问题的是未申明__NR_syslog:
在该C文件中添加相关宏定义。
#define __NR_syslog 103
重新编译即可。。。