[LTP] [PATCH 1/1] m4: Fix warnings

Petr Vorel pvorel@suse.cz
Tue Jan 25 18:09:03 CET 2022


> Hi!
> > diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> > index 5d729a33d..580df00a3 100644
> > --- a/m4/ltp-eventfd.m4
> > +++ b/m4/ltp-eventfd.m4
> > @@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
> >  		AC_SUBST(AIO_LIBS, "-laio")

> >  		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> > -		AC_TRY_LINK([#include <stdio.h>
> > +		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
> >                               #include <libaio.h>
> > -		            ],
> > -		            [io_set_eventfd(NULL, 0); return 0;],
> > +		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
> >  		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
> > -						AC_MSG_RESULT(yes)],
> > -		            [AC_MSG_RESULT(no)])
> > +						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

> Shouldn't we convert this bit into AC_CHECK_FUNCS() (in a separte patch)?

Well, this function is defined as inline in libaio.h.
I was not able to check it with AC_CHECK_FUNCS, nor with AC_CHECK_LIB nor
AC_SEARCH_LIBS.

It was added in Jan 2008 in libaio-0.3.108, even Centos 6 has 0.3.109 (which
cannot compile at least 2 releases back), SLES11-SP4 and Debian stretch
(oldoldstable) have 0.3.110. I guess it's time to expect io_set_eventfd is in
libaio.

Kind regards,
Petr


More information about the ltp mailing list