summaryrefslogtreecommitdiff
path: root/tools/include/nolibc
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-07-20 00:44:33 +0300
committerPaul E. McKenney <paulmck@kernel.org>2022-08-31 15:17:43 +0300
commit8b53e83b08cfdc3f430b5415cd1031d5e7e1f935 (patch)
treeeb404b1a7f06723ab5ce537fc3c7204ebfe64afc /tools/include/nolibc
parenta30d551f34df66d739949a6140b50496afa36f66 (diff)
downloadlinux-8b53e83b08cfdc3f430b5415cd1031d5e7e1f935.tar.xz
tools/nolibc: fix build warning in sys_mmap() when my_syscall6 is not defined
We return -ENOSYS when there's no syscall6() operation, but we must cast it to void* to avoid a warning. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include/nolibc')
-rw-r--r--tools/include/nolibc/sys.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 08491070387b..b8c96878c9ce 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -692,7 +692,7 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd,
{
#ifndef my_syscall6
/* Function not implemented. */
- return -ENOSYS;
+ return (void *)-ENOSYS;
#else
int n;