Make t_gettimeofday pass on sparc64.
authormbuhl <mbuhl@openbsd.org>
Mon, 27 Sep 2021 14:07:44 +0000 (14:07 +0000)
committermbuhl <mbuhl@openbsd.org>
Mon, 27 Sep 2021 14:07:44 +0000 (14:07 +0000)
OK bluhm@

regress/lib/libc/sys/t_gettimeofday.c

index bb716ff..015204b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: t_gettimeofday.c,v 1.3 2020/11/09 23:18:51 bluhm Exp $        */
+/*     $OpenBSD: t_gettimeofday.c,v 1.4 2021/09/27 14:07:44 mbuhl Exp $        */
 /* $NetBSD: t_gettimeofday.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
 
 /*-
@@ -67,6 +67,8 @@ ATF_TC_BODY(gettimeofday_err, tc)
         * allows this behaviour.
         */
        ATF_REQUIRE(signal(SIGSEGV, sighandler) != SIG_ERR);
+       /* On sparc64 dereferencing -1 causes SIGBUS */
+       ATF_REQUIRE(signal(SIGBUS, sighandler) != SIG_ERR);
 #endif
        errno = 0;