Ubuntu下编译libxml2出错

Ubuntu下编译libxml2出错  

2009-12-06 01:01:51|  分类: Linux秘籍 |字号 订阅


关键字: linux

出错信息如下:


  1. gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT nanohttp.lo -MD -MP -MF .deps/nanohttp.Tpo -c nanohttp.c  -fPIC -DPIC -o .libs/nanohttp.o   
  2. nanohttp.c: In function 'xmlNanoHTTPFetch__internal_alias':   
  3. nanohttp.c:1558: warning: ignoring return value of 'write', declared with attribute warn_unused_result   
  4. nanohttp.c: In function 'xmlNanoHTTPSave__internal_alias':   
  5. nanohttp.c:1597: warning: ignoring return value of 'write', declared with attribute warn_unused_result   
  6. In function 'open',   
  7.     inlined from 'xmlNanoHTTPSave__internal_alias' at nanohttp.c:1588:   
  8. /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments   
  9. make[1]: *** [nanohttp.lo] Error 1   
  10. make[1]: Leaving directory `/home/winetcn/libxml2-2.6.30'   
  11. make: *** [install-recursive] Error 1  

解决方法:
打开目录下的nanohttp.c,第1588行由
fd = open(filename, O_CREAT | O_WRONLY);更换为
fd = open(filename, O_CREAT | O_WRONLY,0777);



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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值