Hello,
the problem occured to me when building findutils 4.5.11:
configure:19783: checking for d_ino member in directory struct
configure:19824: gcc -std=gnu99 -o conftest -g -O0 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall
-D_FORTIFY_SOURCE=2 -Wl,-z,relro conftest.c >&5
configure:19824: $? = 0
configure:19824: ./conftest
configure:19824: $? = 4
configure: program exited with status 4
configure: failed program was:
[...]
| DIR *dp = opendir (".");
| struct dirent *e;
| struct stat st;
| if (! dp)
| return 1;
| e = readdir (dp);
| if (! e)
| return 2;
| if (stat (e->d_name, &st) != 0)
| return 3;
| if (e->d_ino != st.st_ino)
| return 4;
| return 0;
In the current directory, in my case, the first file is a symlink:
~/install/findutils-4.5.11$ ls -fl | head
total 15664
lrwxrwxrwx 1 chazelas chazelas 28 Aug 21 20:53 config.guess ->
/usr/share/misc/config.guess
drwxr-xr-x 14 chazelas chazelas 4096 Aug 21 21:14 .
-rw-r--r-- 1 chazelas chazelas 2142 Nov 17 2012 Makefile.am
[...]
So obviously e->d_ino is not the same as st.st_ino.
I think it should be a lstat() above instead of stat()
Best regards,
Stephane (note that I'm not subscribed to the list)