# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
-AC_REPLACE_FUNCS([clock_gettime timer_create timer_settime timer_delete fileno localtime_r pipe putenv setenv sleep strdup strsignal unsetenv])
-AC_CHECK_DECLS([clock_gettime, timer_create, timer_settime, timer_delete, fileno, localtime_r, pipe, putenv, setenv, sleep, strdup, strsignal, unsetenv])
+AC_REPLACE_FUNCS([alarm clock_gettime timer_create timer_settime timer_delete fileno localtime_r pipe putenv setenv sleep strdup strsignal unsetenv])
+AC_CHECK_DECLS([alarm, clock_gettime, timer_create, timer_settime, timer_delete, fileno, localtime_r, pipe, putenv, setenv, sleep, strdup, strsignal, unsetenv])
# Check if the system's snprintf (and its variations) are C99 compliant.
# If they are not, use the version in libcompat.
#endif
/* replacement functions for broken originals */
+#if !HAVE_DECL_ALARM
+unsigned int alarm (unsigned int seconds);
+#endif /* !HAVE_DECL_ALARM */
+
#if !HAVE_MALLOC
void *rpl_malloc (size_t n);
#endif /* !HAVE_MALLOC */