Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2024 'off64_t' does not name a type

WSL
pending
Earnie Boyd
None
Task
fixed
Feature_in_WSL_4.1
False
2014-05-22
2013-09-03
Nicholas
No

With the latest GCC package, including io.h either directly or indirectly (for example, via unistd.h), causes the following errors:

c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type __CRT_INLINE off64_t lseek64 (int, off64_t, int); ^ c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) { ^

Information requested:
$ gcc -v Using built-in specs. COLLECT_GCC=C:\MinGW\bin\gcc.exe COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable -static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --dis able-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs - -with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-sy stem-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-l ibintl-prefix=/mingw Thread model: win32 gcc version 4.8.1 (GCC)

Minimal test case:
#include <unistd.h> int main() {}

It worked fine with a previous GCC version (was it 4.7.2?).

Discussion

1 2 > >> (Page 1 of 2)
  • Trent Gamblin
    Trent Gamblin
    2013-09-03

    Came to report this. Freetype uses the -ansi switch when compiling which causes off64_t not to be defined.

     
  • Nicholas
    Nicholas
    2013-09-03

    I forgot to mention the command and this issue tracker doesn't seem to have an "Edit" feature.

    Anyway, this works fine when compiled without any switches. The problem described occurs when one of -ansi, -std=c++11, -std=c++03 and -std=c++98 is used.

     
  • Earnie Boyd
    Earnie Boyd
    2013-09-03

    • status: unread --> assigned
    • assigned_to: Earnie Boyd
    • Group: OTHER --> WSL
    • Type: Bug --> Task
    • Resolution: none --> later
    • Category: Unknown --> Feature_in_WSL_4.1
     
  • Earnie Boyd
    Earnie Boyd
    2013-09-03

    It wasn't the GCC version update that resulted in this issue.

    I think the fix is to change the io.h lseek64 to use _off64_t instead of off64_t.

    The task for me is to review the off64_t definitions in sys/types.h.

     
    • jdre de vogel
      jdre de vogel
      2014-02-05

      Thx this helped. Did change all 4 off64_t to _off64_t and got past it. Up to the next error!

       
      Last edit: jdre de vogel 2014-02-05
  • HighCommander4
    HighCommander4
    2013-09-07

    I had the same problem upon updating to 4.8.1. I can confirm that using _off64_t instead of off64_t in io.h resolves the problem.

     
  • Earnie Boyd
    Earnie Boyd
    2013-09-19

    Resolved in 4.1-dev branch pending release.

     
    • Keith Marshall
      Keith Marshall
      2014-02-05

      Except that there's an underlying bug, for which a correction should be applied in every active development/release branch. This should not have to wait for 4.1

       
  • Earnie Boyd
    Earnie Boyd
    2013-09-19

    • status: assigned --> pending
    • Resolution: later --> fixed
     
  • Brandon White
    Brandon White
    2014-02-11

    A similar issue exists in unistd.h for int ftruncate(int, off_t);
    I believe it needs a leading underscore as well, such as int ftruncate(int, _off_t);

     
1 2 > >> (Page 1 of 2)