configure fails to detect dirfd on FreeBSD because it is a macro ...
Richard Sharpe
realrichardsharpe at gmail.com
Wed Nov 7 15:52:18 MST 2012
Hi folks,
On FreeBSD, dirfd is not detected by configure:
configure:25451: checking for dirfd
configure:25507: gcc -o conftest -O0
-I/home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/include
-DPANZURA_DEV -I/home/rsharpe/dev-src/buildroot/../pixel8/replock
-I/home/rsharpe/dev-src/buildroot/build/cloudcc/build_x86_64/samba-3.6.6/lib/tdb/include
-I/home/rsharpe/dev-src/buildroot/build/cloudcc/build_x86_64/root/usr/include
-Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent
-I./librpc -I./.. -I./../lib/popt --sysroot
/home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4
-L/home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/lib
-L/home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/lib
-L/home/rsharpe/dev-src/buildroot/build/cloudcc/build_x86_64/samba-3.6.6/source3
-L/home/rsharpe/dev-src/buildroot/build/cloudcc/build_x86_64/samba-3.6.6/source3/bin
-L/home/rsharpe/dev-src/buildroot/build/cloudcc/build_x86_64/licd/build/FreeBSD/export/dist/lib
-rpath /home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/lib -rpath
/home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/lib conftest.c
>&5
/var/tmp//ccQXACBM.o(.text+0xa): In function `main':
: undefined reference to `dirfd'
This is because it is a macro. The code used is:
|
| int
| main ()
| {
| return dirfd ();
| ;
| return 0;
| }
That won't match the dirfd macro.
Does anyone know a quick alternative test for dirfd as a macro?
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list