0

在尝试构建 newlib 1.20.0 时...我遵循了本教程http://wiki.osdev.org/OS_Specific_Toolchain#newlib.2Flibc.2Fsys.2Fmyos

但是在尝试构建 newlib 时出现以下错误:

/../newlib-1.20.0/newlib/libc/sys/myos/'`syscalls.c
../../../../../../newlib-1.20.0/newlib/libc/sys/myos/syscalls.c:29:5: error: conflicting types for 'gettimeofday'
In file included from ../../../../../../newlib-1.20.0/newlib/libc/sys/myos/syscalls.c:7:0:
/usr/src/newlib-1.20.0/newlib/libc/include/sys/time.h:74:5: note: previous declaration of 'gettimeofday' was here
Makefile:280: recipe for target `lib_a-syscalls.o' failed

sycalls.c 用于 gettimeofday 声明:

int gettimeofday(struct timeval *p, struct timezone *z);

时间.h:

int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz));

那么什么是冲突类型?请帮助....任何帮助表示赞赏...

4

1 回答 1

0

更改syscalls.c 中函数声明。然后将 void * 转换为结构时区。

于 2013-10-06T02:10:54.513 回答