Thread: Compile error question

  1. #1
    Registered User
    Join Date
    Sep 2010

    Compile error question


    I am getting this weird error when I try to make that I can't seem to fix.

    http.c:80: error: storage size of ‘start_tpz’ isn’t known
    http.c:80: error: storage size of ‘conn_tpz’ isn’t known
    http.c:80: error: storage size of ‘end_tpz’ isn’t known

    Those three variables are of type struct timezone.

    I have:
    #include <sys/time.h>
    which includes the instantiation of the timezone struct, so it shouldn't be a problem. I also added simply time.h, to no effect.

    Anybody know what's going on?

  2. #2
    Join Date
    Dec 2007
    Those are your variables, so it comes down to what is the code at line 80 and where are those variables declared in relation to line 80?

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Portland, OR
    Your headers probably don't declare the type, just forward-declare it to make some prototypes happy.

    From the glibc docs:

    The struct timezone type is obsolete and should never be used. Instead, use the facilities described in 21.4.8 Functions and Variables for Time Zones.
    Maybe one of the reasons it "should never be used" is because they haven't actually declared it anywhere. Just a guess though.

    EDIT: Yes, the gettimeofday() call takes a timezone pointer as a parameter. You ought to be passing NULL for that. Nobody uses that crud anymore and it's even been completely removed from some systems (such that if you pass a non-NULL timezone pointer, the kernel says ENOSYS)
    Last edited by brewbuck; 09-16-2010 at 04:54 PM.
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);

  4. #4
    Registered User
    Join Date
    Sep 2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C and C++ compile speed
    By swgh in forum A Brief History of
    Replies: 3
    Last Post: 01-02-2007, 01:37 PM
  2. Compile as you type
    By Rocketmagnet in forum A Brief History of
    Replies: 33
    Last Post: 12-07-2006, 12:36 PM
  3. How to compile mfc libs from platform sdk
    By tjcbs in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2006, 07:20 AM
  4. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 08:05 PM
  5. How can I compile C or C++ with Visual Studio .NET?
    By Dakkon in forum C Programming
    Replies: 8
    Last Post: 02-11-2003, 01:58 PM
Website Security Test