linux error syntax before __32,swoole扩展编译报错

环境 Linux version 2.6.32_1-13-0-0 (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #24 SMP Thu Dec 26 12:28:11 CST 2013

cc -I. -I/home/work/local/swoole-1.7.4 -DPHP_ATOM_INC -I/home/work/local/swoole-1.7.4/include -I/home/work/local/swoole-1.7.4/main -I/home/work/local/swoole-1.7.4 -I/home/work/local/php-5.4.32/bin/php/include/php -I/home/work/local/php-5.4.32/bin/php/include/php/main -I/home/work/local/php-5.4.32/bin/php/include/php/TSRM -I/home/work/local/php-5.4.32/bin/php/include/php/Zend -I/home/work/local/php-5.4.32/bin/php/include/php/ext -I/home/work/local/php-5.4.32/bin/php/include/php/ext/date/lib -I/include -I/home/work/local/swoole-1.7.4/include -DHAVE_CONFIG_H -Wall -pthread -g -O2 -c /home/work/local/swoole-1.7.4/src/core/RingQueue.c -fPIC -DPIC -o src/core/.libs/RingQueue.o

In file included from /home/work/local/swoole-1.7.4/src/core/RingQueue.c:17:

/home/work/local/swoole-1.7.4/include/swoole.h:401: error: syntax error before "pthread_rwlock_t"

/home/work/local/swoole-1.7.4/include/swoole.h:401: warning: no semicolon at end of struct or union

/home/work/local/swoole-1.7.4/include/swoole.h:402: warning: type defaults to `int' in declaration of `attr'

/home/work/local/swoole-1.7.4/include/swoole.h:402: warning: data definition has no type or storage class

/home/work/local/swoole-1.7.4/include/swoole.h:404: warning: type defaults to `int' in declaration of `swRWLock'

/home/work/local/swoole-1.7.4/include/swoole.h:404: warning: data definition has no type or storage class

/home/work/local/swoole-1.7.4/include/swoole.h:410: error: syntax error before "pthread_spinlock_t"

/home/work/local/swoole-1.7.4/include/swoole.h:410: warning: no semicolon at end of struct or union

/home/work/local/swoole-1.7.4/include/swoole.h:411: warning: type defaults to `int' in declaration of `swSpinLock'

/home/work/local/swoole-1.7.4/include/swoole.h:411: warning: data definition has no type or storage class

/home/work/local/swoole-1.7.4/include/swoole.h:435: error: syntax error before "swRWLock"

/home/work/local/swoole-1.7.4/include/swoole.h:435: warning: no semicolon at end of struct or union

/home/work/local/swoole-1.7.4/include/swoole.h:435: warning: no semicolon at end of struct or union

/home/work/local/swoole-1.7.4/include/swoole.h:440: error: syntax error before "spinlock"

/home/work/local/swoole-1.7.4/include/swoole.h:440: warning: type defaults to `int' in declaration of `spinlock'

/home/work/local/swoole-1.7.4/include/swoole.h:440: warning: data definition has no type or storage class

/home/work/local/swoole-1.7.4/include/swoole.h:442: warning: type defaults to `int' in declaration of `object'

/home/work/local/swoole-1.7.4/include/swoole.h:442: warning: data definition has no type or storage class

/home/work/local/swoole-1.7.4/include/swoole.h:448: error: 'free' redeclared as different kind of symbol

/usr/include/stdlib.h:597: error: previous declaration of 'free' was here

/home/work/local/swoole-1.7.4/include/swoole.h:448: error: 'free' redeclared as different kind of symbol

/usr/include/stdlib.h:597: error: previous declaration of 'free' was here

/home/work/local/swoole-1.7.4/include/swoole.h:449: error: syntax error before '}' token

/home/work/local/swoole-1.7.4/include/swoole.h:454: error: field `lock' has incomplete type

/home/work/local/swoole-1.7.4/include/swoole.h:916: error: field `lock' has incomplete type

/home/work/local/swoole-1.7.4/include/swoole.h:1037: error: field `lock' has incomplete type

/home/work/local/swoole-1.7.4/src/core/RingQueue.c: In function `swRingQueue_free':

/home/work/local/swoole-1.7.4/src/core/RingQueue.c:113: warning: passing arg 1 of pointer to function from incompatible pointer type

make: *** [src/core/RingQueue.lo] Error 1

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值