From 56b49e899e4fa59a89ce717d1b8aababf4a8604c Mon Sep 17 00:00:00 2001 From: bluhm <> Date: Tue, 10 Nov 2020 14:43:14 +0000 Subject: Declare prototype of __syscall locally. Fixes t_syscall test. --- src/regress/lib/libc/sys/Makefile | 3 +-- src/regress/lib/libc/sys/t_syscall.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/regress/lib/libc/sys') diff --git a/src/regress/lib/libc/sys/Makefile b/src/regress/lib/libc/sys/Makefile index db67e9078a..c373432f56 100644 --- a/src/regress/lib/libc/sys/Makefile +++ b/src/regress/lib/libc/sys/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2020/11/09 23:18:51 bluhm Exp $ +# $OpenBSD: Makefile,v 1.7 2020/11/10 14:43:14 bluhm Exp $ # Copyright (c) 2019 Moritz Buhl # Copyright (c) 2019 Alexander Bluhm @@ -53,7 +53,6 @@ REGRESS_EXPECTED_FAILURES += run-t_msgrcv-3 REGRESS_EXPECTED_FAILURES += run-t_pipe2-2 REGRESS_EXPECTED_FAILURES += run-t_stat-1 run-t_stat-4 run-t_stat-5 REGRESS_EXPECTED_FAILURES += run-t_stat-6 run-t_stat-8 -REGRESS_EXPECTED_FAILURES += run-t_syscall-1 REGRESS_EXPECTED_FAILURES += run-t_unlink-2 . for p in ${PROGS} diff --git a/src/regress/lib/libc/sys/t_syscall.c b/src/regress/lib/libc/sys/t_syscall.c index e864970262..72ad9139d6 100644 --- a/src/regress/lib/libc/sys/t_syscall.c +++ b/src/regress/lib/libc/sys/t_syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_syscall.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */ +/* $OpenBSD: t_syscall.c,v 1.2 2020/11/10 14:43:14 bluhm Exp $ */ /* $NetBSD: t_syscall.c,v 1.3 2018/05/28 07:55:56 martin Exp $ */ /*- @@ -47,6 +47,11 @@ __RCSID("$NetBSD: t_syscall.c,v 1.3 2018/05/28 07:55:56 martin Exp $"); #include #include +#ifdef __OpenBSD__ +/* Declare prototype of __syscall locally specifying the return type. */ +quad_t __syscall(quad_t number, ...); +#endif + #if !defined(_LP64) && BYTE_ORDER == _BIG_ENDIAN #define __SYSCALL_TO_UINTPTR_T(V) ((uintptr_t)((V)>>32)) #else -- cgit v1.2.3-55-g6feb