diff mbox series

[02/17] tools/nolibc: fix build warning in sys_mmap() when my_syscall6 is not defined

Message ID 20220719214449.2520-3-w@1wt.eu (mailing list archive)
State Accepted
Commit 8b53e83b08cfdc3f430b5415cd1031d5e7e1f935
Headers show
Series nolibc: add preliminary self tests | expand

Commit Message

Willy Tarreau July 19, 2022, 9:44 p.m. UTC
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>
---
 tools/include/nolibc/sys.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;