I am finding this problem with configure.in on FreeBSD 8.0 configure:82175: checking for aio_suspend configure:82187: gcc -o conftest -I/usr/include -O0 -g -I/home/rsharpe/dev-src/ buildroot/tools/x86_gcc4.2.4/usr/include -DPANZURA_DEV -I/usr/include -I/home/r sharpe/dev-src/buildroot/../pixel8/replock -I/home/rsharpe/dev-src/buildroot/bui ld/cloudcc/build_x86_64/samba-3.6.6/lib/tdb/include -I/home/rsharpe/dev-src/buil droot/build/cloudcc/build_x86_64/root/usr/include -I/home/rsharpe/dev-src/buildr oot/build/cloudcc/build_x86_64/tools/x86_gcc4.2.4/usr/include -I/home/rsharpe/de v-src/buildroot/../pixel8/pz_cifsaudit -Iinclude -I./include -I. -I. -I./../lib /replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/popt -I/usr/include -DLD AP_DEPRECATED --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/bu ildroot/tools/x86_gcc4.2.4/usr/lib -g -L/home/rsharpe/dev-src/buildroot/build/cl oudcc/build_x86_64/root/lib -L/home/rsharpe/dev-src/buildroot/build/cloudcc/buil d_x86_64/samba-3.6.6/source3 -L/home/rsharpe/dev-src/buildroot/build/cloudcc/bui ld_x86_64/samba-3.6.6/source3/bin -L/home/rsharpe/dev-src/buildroot/build/cloudc c/build_x86_64/pz_cifsaudit -L/home/rsharpe/dev-src/buildroot/build/cloudcc/buil d_x86_64/licd/build/FreeBSD/export/dist/lib -rpath /home/rsharpe/dev-src/buildro ot/tools/x86_gcc4.2.4/lib -rpath /home/rsharpe/dev-src/buildroot/tools/x86_gcc4. 2.4/usr/lib -L./bin -L/usr/lib conftest.c -lexecinfo -liconv -lrt >&5 conftest.c: In function 'main': conftest.c:2: error: 'NULL' undeclared (first use in this function) conftest.c:2: error: (Each undeclared identifier is reported only once conftest.c:2: error: for each function it appears in.) conftest.c:2: warning: passing argument 1 of 'aio_suspend' from incompatible poi nter type configure:82194: $? = 1 configure: failed program was: | #include <aio.h> | int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); } configure:82212: result: no
The following patch fixes this problem: From 57c6874ad1a742c5d50bb133f16b7b8a8b9f6faf Mon Sep 17 00:00:00 2001 From: Volker Lendecke <vl@samba.org> Date: Mon, 7 Jan 2013 11:06:15 +0100 Subject: [PATCH] configure: Fix aio_suspend detection on FreeBSD NULL is not defined without some includes --- source3/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/configure.in b/source3/configure.in index d8d3a1f..7266000 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -5826,7 +5826,7 @@ int main() { struct aiocb a; return aio_cancel(1, &a); }], AC_MSG_CHECKING(for aio_suspend) AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }], +int main() { struct aiocb a; struct timespec t; return aio_suspend(&a, 1, &t); }], [AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi -- 1.7.9.5 However, that should be const struct timespec t; to avoid a warning :-)
Created attachment 8387 [details] Patch Same patch in a more digestable format. Jeremy, as Richard can't ack patches, can you put your +1 to this? Thanks, Volker
(In reply to comment #1) > However, that should be const struct timespec t; to avoid a warning :-) The warning was for argument 1 of aio_suspend. Not sure how to fix that. I did try some variations, but I failed.
Comment on attachment 8387 [details] Patch I think I can review bugs now that I am using the correct account.
Comment on attachment 8387 [details] Patch Looks good to me ! Jeremy.
Karo, please pick for v3-6-test and -stable. Thanks, Volker
Created attachment 8388 [details] git-am fix for master and 4.0.x. Same fix applied to the WAF build also. Jeremy.
*** Bug 9547 has been marked as a duplicate of this bug. ***
Pushed to autobuild-master.
(In reply to comment #9) > Pushed to autobuild-master. Failing with: /usr/bin/m4:configure.in:5388: ERROR: end of file in string autom4te: /usr/bin/m4 failed with exit status: 1 autoheader2.50: '/usr/bin/autom4te' failed with exit status: 1 ERROR running autoheader
Created attachment 8397 [details] Patch Jeremy, please push to master if you're okay with this. Note the missing ])
Comment on attachment 8397 [details] Patch Jeremy, ping :-)
Comment on attachment 8397 [details] Patch Pushed to master.
Re-assigned to Karolin for inclusion in 3.6.next, 4.0.next. Jeremy.
Pushed to v3-6-test and autobuild-v4-0-test.
Pushed to v4-0-test. Closing out bug report. Thanks!
Volker, can we change this test for more more compliant port version: - conf.CHECK_CODE('struct aiocb a; struct timespec t; return aio_suspend(&a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', lib='aio rt') + conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec t; return aio_suspend(a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', lib='aio rt')
(In reply to comment #17) > Volker, can we change this test for more more compliant port version: > > - conf.CHECK_CODE('struct aiocb a; struct timespec t; return aio_suspend(&a, 1, > &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', > lib='aio rt') > + conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec t; return > aio_suspend(a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', > headers='aio.h', lib='aio rt') This bug has been closed out, so you will have to create a new bug. What problems does it cause? When we looked at the original patch there were still some warning, and it looks like maybe your fix fixes those warnings as well.
(In reply to comment #18) > (In reply to comment #17) > > Volker, can we change this test for more more compliant port version: > > > > - conf.CHECK_CODE('struct aiocb a; struct timespec t; return aio_suspend(&a, 1, > > &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', > > lib='aio rt') > > + conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec t; return > > aio_suspend(a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', > > headers='aio.h', lib='aio rt') > > This bug has been closed out, so you will have to create a new bug. > > What problems does it cause? > > When we looked at the original patch there were still some warning, and it > looks like maybe your fix fixes those warnings as well. It does, that what ACTUALLY expected by the function. I was just curios, can I reopen the bug with replying on it, but seems you right, have to file a new one.
(In reply to comment #19) > (In reply to comment #18) > > (In reply to comment #17) > > > Volker, can we change this test for more more compliant port version: > > > > > > - conf.CHECK_CODE('struct aiocb a; struct timespec t; return aio_suspend(&a, 1, > > > &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', > > > lib='aio rt') > > > + conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec t; return > > > aio_suspend(a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', > > > headers='aio.h', lib='aio rt') > > > > This bug has been closed out, so you will have to create a new bug. > > > > What problems does it cause? > > > > When we looked at the original patch there were still some warning, and it > > looks like maybe your fix fixes those warnings as well. > > It does, that what ACTUALLY expected by the function. > > I was just curios, can I reopen the bug with replying on it, but seems you > right, have to file a new one. I will submit this patch as coming from you ...