How to properly check for aio_suspend ...

Richard Sharpe realrichardsharpe at
Fri Feb 8 20:40:12 MST 2013

Hi folks,

Courtesy of Timur, here is a correct configure test. Note the quoting
of the array:

diff --git a/source3/ b/source3/
index b17a37e..4efcbfb 100644
--- a/source3/
+++ b/source3/
@@ -5387,7 +5387,7 @@ int main() { struct aiocb a; return aio_cancel(1, &a); }])

                        AC_MSG_CHECKING(for aio_suspend)
                        AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
-int main() { struct aiocb a; struct timespec t; return aio_suspend(&a, 1, &t);
+int main() { const struct aiocb * const [a[1]]; struct timespec t; return aio_s
 [AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)],

No more warnings.

Working up one for waf now.

Richard Sharpe

More information about the samba-technical mailing list