libossのファイルを含むプログラムをコンパイルしようとしていますが、コンパイルすると次のエラーが発生します。
In file included from test.c:1:
/opt/local/include/liboss/soundcard.h:342: error: static declaration of ‘ioctl’ follows non-static declaration
/usr/include/sys/ioctl.h:97: error: previous declaration of ‘ioctl’ was here
/opt/local/include/liboss/soundcard.h:353: error: static declaration of ‘open’ follows non-static declaration
/usr/include/sys/fcntl.h:464: error: previous declaration of ‘open’ was here
/opt/local/include/liboss/soundcard.h:363: error: static declaration of ‘close’ follows non-static declaration
/usr/include/unistd.h:476: error: previous declaration of ‘close’ was here
/opt/local/include/liboss/soundcard.h:366: error: conflicting types for ‘write’
/usr/include/unistd.h:535: error: previous declaration of ‘write’ was here
最初のエラーが発生する行はこれです。
@サウンドカード.h
static inline int LIBOSS_IOCTL (int x, unsigned long y,...)
{
int result;
va_list l;
va_start(l,y);
result = liboss_ioctl(x,y,l);
va_end (l);
return result;
}
@ ioctl.h
__BEGIN_DECLS
int ioctl(int, unsigned long, ...);
__END_DECLS
これが問題にならないようにsoundcard.hにモンキーパッチを適用する方法はありますか?
Thnx!A。
仕様:Mac OSX 10.7.4、gcc i686-apple-darwin11-llvm-gcc-4.2(GCC)4.2.1