tools/nolibc: fix build warning in sys_mmap() when my_syscall6 is not defined
authorWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 21:44:33 +0000 (23:44 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:17:43 +0000 (05:17 -0700)
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>
tools/include/nolibc/sys.h

index 0849107..b8c9687 100644 (file)
@@ -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;