[En-Nut-Discussion] Error while building Nut/OS configuration

Harald Kipp harald.kipp at egnite.de
Thu Jun 11 19:32:12 CEST 2009

Faas, Hylke wrote:
> ../../nut/crt/setenv.c:195: error: conflicting types for 'unsetenv'
> c:/program files/yagarto/lib/gcc/../../arm-elf/sys-include/stdlib.h:181:
> error: previous declaration of 'unsetenv' was here
> make[1]: *** [setenv.o] Error 1





"Nut/OS borrowed a lot of code from BSD, where unsetenv is a void
function, while Posix specifies an integer return type. Initially newlib
used the BSD variant, but changed to Posix after versions 1.17. The
newlib maintainers, in their infinite wisdom, decided to use a string
constant as a version identifier and refuse to add an integer variant,
which could have been checked automatically by the preprocessor. This is
why you have to select Posix conformance of unsetenv manually in the
Configurator under C Runtime (target specific) / Environment."

More information about the En-Nut-Discussion mailing list