OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Mar 23, 2019 6:36 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Newlib timeval error
PostPosted: Thu Apr 28, 2016 6:39 am 
Offline
Member
Member

Joined: Sun Mar 01, 2015 7:58 am
Posts: 51
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:
Code:
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 are other errors too, but I think the first one is the cause of all. Other errors could be found here: http://pastebin.com/Ju4jKCj2.
And my configuration files here: https://github.com/JustBeYou/Newlib-for-PhotonOS/tree/master/newlib

What could cause this error? I don't see anything wrong in headers.
Thanks.


Top
 Profile  
 
 Post subject: Re: Newlib timeval error
PostPosted: Fri Apr 29, 2016 4:11 am 
Offline
Member
Member

Joined: Mon Apr 09, 2007 12:10 pm
Posts: 775
Location: London, UK
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.

Regards,
John.

_________________
Tysos | rpi-boot


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group