S_ISREG is not working, stat issue?

Stefan de Konink stefan at konink.de
Sat Dec 6 20:48:59 UTC 2008


Stefan de Konink wrote:
> Stefan de Konink wrote:
>> I am unable to use S_ISREG, basically I guess it is working but 
>> stat.st_mode is not set in a correct way.
> 
> Using strace I see:
> 
> stat("/etc/cherokee/cherokee.conf", {st_mode=S_IFREG|0644, st_size=544, 
> ...}) = 0
> 
>          stat ("/etc/cherokee/cherokee.conf", &info);
>          printf("%d\n", S_ISREG(info.st_mode));
> 
> Still returns 0;

I think the problem is in uclibc being compiled with 3.4.6 while I 
compiled this program with 3.3.6. Seems to work now.


Stefan



More information about the uClibc mailing list