Build failures: nanosleep on Solaris and AIX 4.2.x

Albert Chin openssh-unix-dev at thewrittenword.com
Mon Jan 27 17:15:10 EST 2003


On Sat, Jan 25, 2003 at 06:47:38PM +1100, Darren Tucker wrote:
> Index: configure.ac
> ===================================================================
> RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
> retrieving revision 1.102
> diff -u -r1.102 configure.ac
> --- configure.ac	20 Jan 2003 04:20:25 -0000	1.102
> +++ configure.ac	25 Jan 2003 06:48:20 -0000
> @@ -615,6 +615,11 @@
>  
>  dnl Make sure strsep prototype is defined before defining HAVE_STRSEP
>  AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
> +
> +AC_CHECK_FUNC(nanosleep,
> +        AC_DEFINE(HAVE_NANOSLEEP),
> +        AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
> +)

This is the same as:
  AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
AC_SEARCH_LIBS will first search for nanosleep() with no libraries
linked in, then iterate through -lrt and then -lposix4.

Also, acconfig.h is deprecated. With the following, you don't need a
HAVE_NANOSLEEP entry in acconfig.h:
  AC_SEARCH_LIBS(nanosleep, rt posix4,
    AC_DEFINE(HAVE_NANOSLEEP, 1, [If nanosleep() is available]))

-- 
albert chin (china at thewrittenword.com)




More information about the openssh-unix-dev mailing list