安装nginx时关系依赖库openssl.lib时,出现:error: 'NR_syscalls' undeclared (first use in this function)

安装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
重新编译即可。。。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值