Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I am trying to port newlib to my OS. I added my OS to configuration files and I created a directory for it (I am following the tutorial from http://wiki.osdev.org/Porting_Newlib). Now when I try 'make all', I get following error:
In file included from /home/littlewho/Desktop/sourcecode/photon/devel/src/newlib/newlib/libc/include/sys/time.h:42:0,
from ../../../../../newlib/newlib/libc/time/time.c:38:
/home/littlewho/Desktop/sourcecode/photon/devel/src/newlib/newlib/libc/include/sys/_timeval.h:51:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
struct timeval {
There's probably a typo somewhere in the lines leading up to the definition. Potentially the #define of TIME_T or something. What is the exact command line that is being used to compile time.c? You can see exactly what the compiler is trying to compile by replacing the '-c' with '-E' and the '-o time.o' or whatever with '-o time.preprocessed' or somesuch. This will produce the preprocessed output and you can more easily see where the error is then.