今天在编译一个RTC驱动测试程序时,出现了如下的一大堆提示:
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:31,
from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:30,
from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:32: warning: `__FD_ZERO' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:75: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:33: warning: `__FD_SET' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:63: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:34: warning: `__FD_CLR' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:67: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:35: warning: `__FD_ISSET' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:71: warning: this is the location of the previous definition
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:30,
from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:58: warning: `__NFDBITS' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/posix_types.h:22: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:60: warning: `__FDMASK' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/posix_types.h:34: warning: this is the location of the previous definition
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:26,
from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/time.h:70: warning: redefinition of `time_t'
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/types.h:69: warning: `time_t' previously declared here
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:30,
from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:49: warning: redefinition of `suseconds_t'
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/types.h:22: warning: `suseconds_t' previously declared here
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:74: conflicting types for `fd_set'
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/types.h:13: previous declaration of `fd_set'
几经周折才发现,原来是我用的编译器版本太低,只支持编译2.4内核相关的东东。而我是在2.6内核环境下进行的编译,于是换了个更高版本的编译器就搞定了。