www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - static if, compiler bug?


in druntime 
there is following definiton:

else version (CRuntime_Musl)
     alias long      blksize_t;
     alias ulong     nlink_t;
     alias long      dev_t;
     alias long      blkcnt_t;
     alias ulong     ino_t;
     alias long      off_t;
     alias long      _Addr;
     alias int       pid_t;
     alias uint      uid_t;
     alias uint      gid_t;
     alias long      time_t;
     alias long      clock_t;
     alias ulong     pthread_t;
     alias _Addr     ssize_t;

If I replace the line "alias long off_t;" with:

   static if ( __USE_FILE_OFFSET64 )
	alias long      off_t;
	alias slong_t      off_t;

the I got following compiler error:
/mnt/c/D/ldc-1.14.0-src/runtime/druntime/src/core/stdc/stdio.d(1676): Error:
module `core.sys.posix.sys.types` import off_t not found

I cannot explain this error, because off_t is defined in both 
cases of the static if.
Even if I change it to:

   static if ( true )
	alias long off_t;

I get the same error. Is this a compiler bug?

Kind regards
Mar 03 2019