readdir not setting d_type 0.9.28
Rogelio Serrano
rogelio.serrano at gmail.com
Thu Sep 7 05:29:18 UTC 2006
On 9/7/06, Rich Felker <dalias at aerifal.cx> wrote:
> 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..
>
the manual is saying that d_type is not portable so i went ahead and
used stat instead.
i think i have lfs enabled in my uclibc config.
--
the thing i like with my linux pc is that i can sum up my complaints in 5 items
More information about the uClibc
mailing list