C++ libev-4.15没有';t在OSX 10.8上编译

C++ libev-4.15没有';t在OSX 10.8上编译,c++,macos,gcc,clang,libev,C++,Macos,Gcc,Clang,Libev,我正试图从libev-3.8(在OSX 10.8上编译得很好)升级到libev-4.15,出现以下错误 third_party/libev-4.15/ev.h:234: error: expected identifier before numeric constant third_party/libev-4.15/ev.h:234: error: expected `}' before numeric constant third_party/libev-4.15/ev.h:234: erro

我正试图从libev-3.8(在OSX 10.8上编译得很好)升级到libev-4.15,出现以下错误

third_party/libev-4.15/ev.h:234: error: expected identifier before numeric constant
third_party/libev-4.15/ev.h:234: error: expected `}' before numeric constant
third_party/libev-4.15/ev.h:234: error: expected unqualified-id before numeric constant
third_party/libev-4.15/ev.h:842: error: expected declaration before ‘}’ token
链接到ev.h:

我的系统配置:

checking host system type... i386-apple-darwin12.3.0
checking target system type... i386-apple-darwin12.3.0
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking how to convert i386-apple-darwin12.3.0 file names to i386-apple-darwin12.3.0 format... func_convert_file_noop
checking how to convert i386-apple-darwin12.3.0 file names to toolchain format... func_convert_file_noop
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r

FWIW,同一配置在CentOS5.6上编译得很好。

结果表明,在OSX上,“EV.h”中声明的“EV_ERROR”与“/usr/include/sys/event.h”中声明的“EV_ERROR”冲突

作为修复,我必须向前声明我使用的ev变量,而不是将ev.h直接包含在我的一个源文件中。这就成功了