mirror of https://github.com/xzeldon/htop.git
Find the correct library for clock_gettime before trying to use it
Otherwise if clock_gettime is librt then this code will incorrectly believe that the function does not exist at all.
This commit is contained in:
parent
03824da684
commit
b20bb543ce
|
@ -92,6 +92,10 @@ AC_TYPE_UINT64_T
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
AC_FUNC_CLOSEDIR_VOID
|
AC_FUNC_CLOSEDIR_VOID
|
||||||
AC_FUNC_STAT
|
AC_FUNC_STAT
|
||||||
|
|
||||||
|
AC_SEARCH_LIBS([dlopen], [dl dld])
|
||||||
|
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([\
|
AC_CHECK_FUNCS([\
|
||||||
clock_gettime\
|
clock_gettime\
|
||||||
faccessat\
|
faccessat\
|
||||||
|
@ -101,9 +105,6 @@ AC_CHECK_FUNCS([\
|
||||||
readlinkat\
|
readlinkat\
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_SEARCH_LIBS([dlopen], [dl dld])
|
|
||||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
|
||||||
|
|
||||||
save_cflags="${CFLAGS}"
|
save_cflags="${CFLAGS}"
|
||||||
CFLAGS="${CFLAGS} -std=c99"
|
CFLAGS="${CFLAGS} -std=c99"
|
||||||
AC_MSG_CHECKING([whether cc -std=c99 option works])
|
AC_MSG_CHECKING([whether cc -std=c99 option works])
|
||||||
|
|
Loading…
Reference in New Issue