readdir not setting d_type 0.9.28

Rich Felker dalias at aerifal.cx
Wed Sep 6 21:33:38 UTC 2006


On Thu, Sep 07, 2006 at 01:40:27AM +0800, Rogelio Serrano wrote:
> readdir is not setting d_type in struct dirent?
> 
> am i missing something?
> 
> hre is the test im using:
> 
> #include <dirent.h>
> #include <stdio.h>
> 
> int
> main()
> {
>     struct dirent * de;
>     DIR * mydir;
> 
>     mydir = opendir("testdir");
>     de = readdir(mydir);
>     while(de)
>     {
>          printf("%d\n", de->d_type);
>         de = readdir(myfir);
>     }
>     closedir(mydir);
>     return 0;
> }
> 
> im using 0.9.28 on 2.6.17

This is normal because you haven't enabled large file support and
d_type is not supported in the old legacy syscalls without lfs.
However there's a workaround in current svn I believe..

Rich




More information about the uClibc mailing list