cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Compile issues with Digi NET+OS

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 6 Aug 2010 10:58:04 -0700

On Fri, Aug 06, 2010 at 12:14:07PM -0500, Matt Olcikas wrote:
> I am working on porting libcurl to Digi NET+OS. I think I almost have it
> compiling, but I am stuck on 2 compile errors.
>
> ../lib/libcurl/lib/formdata.c: In function 'AddFormData':
> ../lib/libcurl/lib/formdata.c:886: error: storage size of 'file' isn't known
> ../lib/libcurl/lib/formdata.c:887: warning: implicit declaration of function
> 'stat'
> ../lib/libcurl/lib/formdata.c:886: warning: unused variable 'file'
>
> It looks like the struct stat is not defined anywhere. Where can I find the
> correct definition for this struct?

According to POSIX, it's found in sys/stat.h. The definition can be found at
http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html

> ../lib/libcurl/lib/timeval.c: In function 'curlx_tvnow':
> ../lib/libcurl/lib/timeval.c:97: warning: implicit declaration of function
> 'time'
>
> The OS does not have a function named "time". Do I need to write my own ?time?
> function that returns time since epoch in seconds? Is the epoch the standard
> jan 1 1970? This would not be too hard to do since our product will have an
> RTC.

Yes on all counts. See
http://www.opengroup.org/onlinepubs/000095399/functions/time.html

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-06