diff options
author | bluhm <> | 2020-11-10 14:43:14 +0000 |
---|---|---|
committer | bluhm <> | 2020-11-10 14:43:14 +0000 |
commit | 56b49e899e4fa59a89ce717d1b8aababf4a8604c (patch) | |
tree | 4322ddd2eba70c5546beadb1fcab355d237fe831 /src/regress/lib/libc/sys | |
parent | c369d42df84f5bdabcac9041e6c5680a0cbfeaf9 (diff) | |
download | openbsd-56b49e899e4fa59a89ce717d1b8aababf4a8604c.tar.gz openbsd-56b49e899e4fa59a89ce717d1b8aababf4a8604c.tar.bz2 openbsd-56b49e899e4fa59a89ce717d1b8aababf4a8604c.zip |
Declare prototype of __syscall locally. Fixes t_syscall test.
Diffstat (limited to 'src/regress/lib/libc/sys')
-rw-r--r-- | src/regress/lib/libc/sys/Makefile | 3 | ||||
-rw-r--r-- | src/regress/lib/libc/sys/t_syscall.c | 7 |
2 files changed, 7 insertions, 3 deletions
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 @@ | |||
1 | # $OpenBSD: Makefile,v 1.6 2020/11/09 23:18:51 bluhm Exp $ | 1 | # $OpenBSD: Makefile,v 1.7 2020/11/10 14:43:14 bluhm Exp $ |
2 | 2 | ||
3 | # Copyright (c) 2019 Moritz Buhl <openbsd@moritzbuhl.de> | 3 | # Copyright (c) 2019 Moritz Buhl <openbsd@moritzbuhl.de> |
4 | # Copyright (c) 2019 Alexander Bluhm <bluhm@openbsd.org> | 4 | # Copyright (c) 2019 Alexander Bluhm <bluhm@openbsd.org> |
@@ -53,7 +53,6 @@ REGRESS_EXPECTED_FAILURES += run-t_msgrcv-3 | |||
53 | REGRESS_EXPECTED_FAILURES += run-t_pipe2-2 | 53 | REGRESS_EXPECTED_FAILURES += run-t_pipe2-2 |
54 | REGRESS_EXPECTED_FAILURES += run-t_stat-1 run-t_stat-4 run-t_stat-5 | 54 | REGRESS_EXPECTED_FAILURES += run-t_stat-1 run-t_stat-4 run-t_stat-5 |
55 | REGRESS_EXPECTED_FAILURES += run-t_stat-6 run-t_stat-8 | 55 | REGRESS_EXPECTED_FAILURES += run-t_stat-6 run-t_stat-8 |
56 | REGRESS_EXPECTED_FAILURES += run-t_syscall-1 | ||
57 | REGRESS_EXPECTED_FAILURES += run-t_unlink-2 | 56 | REGRESS_EXPECTED_FAILURES += run-t_unlink-2 |
58 | 57 | ||
59 | . for p in ${PROGS} | 58 | . 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 @@ | |||
1 | /* $OpenBSD: t_syscall.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */ | 1 | /* $OpenBSD: t_syscall.c,v 1.2 2020/11/10 14:43:14 bluhm Exp $ */ |
2 | /* $NetBSD: t_syscall.c,v 1.3 2018/05/28 07:55:56 martin Exp $ */ | 2 | /* $NetBSD: t_syscall.c,v 1.3 2018/05/28 07:55:56 martin Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -47,6 +47,11 @@ __RCSID("$NetBSD: t_syscall.c,v 1.3 2018/05/28 07:55:56 martin Exp $"); | |||
47 | #include <sys/endian.h> | 47 | #include <sys/endian.h> |
48 | #include <sys/syscall.h> | 48 | #include <sys/syscall.h> |
49 | 49 | ||
50 | #ifdef __OpenBSD__ | ||
51 | /* Declare prototype of __syscall locally specifying the return type. */ | ||
52 | quad_t __syscall(quad_t number, ...); | ||
53 | #endif | ||
54 | |||
50 | #if !defined(_LP64) && BYTE_ORDER == _BIG_ENDIAN | 55 | #if !defined(_LP64) && BYTE_ORDER == _BIG_ENDIAN |
51 | #define __SYSCALL_TO_UINTPTR_T(V) ((uintptr_t)((V)>>32)) | 56 | #define __SYSCALL_TO_UINTPTR_T(V) ((uintptr_t)((V)>>32)) |
52 | #else | 57 | #else |