boa移植过程中出现的问题

1>. 错误1: gethostbyname:: No such file or directory

     解决办法: 修改boa.conf   去掉 ServerName www.your.org.here 前的注释符号(#)

 

2>. 错误1: util.c:100:1: error: pasting "t" and "->"does not give a valid preprocessing token make: *** [util.o]

     解决办法: 修改 src/compat.h

   找到

   #defineTIMEZONE_OFFSET(foo) foo##->tm_gmtoff

   修改成

   #defineTIMEZONE_OFFSET(foo) (foo)->tm_gmtoff

 

3>. 错误2: boa.c:211 - getpwuid: No such file or directory

     解决办法: 修改src/boa.c

   注释掉下面这段程序:

   if (passwdbuf == NULL) {

   DIE(”getpwuid”);

   }

   if(initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {

   DIE(”initgroups”);

   }

  即修改为:

  #if 0

   if (passwdbuf == NULL) {

   DIE(”getpwuid”);

   }

   if(initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {

   DIE(”initgroups”);

   }

  #endif

 

 4>. 错误3: boa.c:228 - icky Linux kernel bug!: No such file or directory

    解决办法: 修改src/boa.c

  注释掉下面语句:

  if(setuid(0) != -1) {

  DIE(”icky Linux kernel bug!”);

  }

  即修改为:

  #if 0

   if(setuid(0) != -1) {

   DIE(”icky Linux kernel bug!”);

   }

  #endif

 

 5>. 错误4: log.c:73 unable to dup2 the error log:bad file descriptor

    解决方法:

    方法1> 确定日志目录对与所有用户都具有可读/写的权限

    方法2> 修改src/log.c (建议采用方法1)

  注释掉

  if(dup2(error_log, STDERR_FILENO) == -1) {

  DIE("unableto dup2 the error log");

  }

  即修改为:

  #if 0

    if (dup2(error_log, STDERR_FILENO) == -1) {

  DIE("unable to dup2 the error log");

   }

   #endif
 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值