#include <string.h>
#if HAVE_SYS_RESOURCE_H
+/* Include sys/time.h here, because...
+ SunOS-4.1.x <sys/resource.h> fails to include <sys/time.h>.
+ This gives "incomplete type" errors for ru_utime and tu_stime. */
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# endif
# include <sys/resource.h>
#endif
void *p;
} alternate_signal_stack;
-# if defined SA_ONSTACK && defined _SC_PAGESIZE
+# if defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE
/* Handle a segmentation violation and exit. This function is
async-signal-safe. */
stack_overflow_message = _("stack overflow");
{
-# if ! (defined SA_ONSTACK && defined _SC_PAGESIZE)
+# if ! (defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE)
return signal (SIGSEGV, die) == SIG_ERR ? -1 : 0;
# else
struct sigaction act;