AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only

Compile errors when LARGE_FILE_API enabled

  • 1.  Compile errors when LARGE_FILE_API enabled

    Posted Thu January 11, 2007 04:42 PM

    Originally posted by: SystemAdmin


    I am getting a few compile errors when enabling the large file support; I'm getting the error on several files, but arbitrarily I'll place just one example:

    /usr/include/unistd.h:153: error: conflicting types for 'lseek64'
    /usr/include/unistd.h:151: error: previous declaration of 'lseek64' was here

    opening /usr/include/unistd.h I see that lseek is as follows:
    151: extern off_t lseek(int, off_t, int);
    152: #ifdef _LARGE_FILE_API
    153: extern off64_t lseek64(int, off64_t, int);
    154: #endif

    So gcc (I tried 2.9 and 3.4.3) will see lseek in line 151, and it will make it lseek64 because of the large file being enabled, but then it gets to line 153 and it will complain because of the conflicting types. Is there an easy way around this problem?
    #AIX-Forum