This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Force type cast in INLINE_SYSCALL_RETURN
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: hjl dot tools at gmail dot com
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 21 Aug 2015 11:50:12 -0300
- Subject: [PATCH] Force type cast in INLINE_SYSCALL_RETURN
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOqNodDbB2mi4SU6agR=-qK0yfRHyFq7BiwBeWre-gJ1tw at mail dot gmail dot com>
"H.J. Lu" <hjl.tools@gmail.com> writes:
> diff --git a/sysdeps/unix/sysdep.h b/sysdeps/unix/sysdep.h
> index 52dad58..c4316db 100644
> --- a/sysdeps/unix/sysdep.h
> +++ b/sysdeps/unix/sysdep.h
> @@ -73,3 +73,22 @@
> #ifndef INLINE_SYSCALL
> #define INLINE_SYSCALL(name, nr, args...) __syscall_##name (args)
> #endif
> +
> +/* Similar to INLINE_SYSCALL, but with return type. It should only be
> + used with function return. */
> +#ifndef INLINE_SYSCALL_RETURN
> +#define INLINE_SYSCALL_RETURN(name, nr, type, args...) \
> + INLINE_SYSCALL (name, nr, args)
> +#endif
This is breaking the build on ppc.
Did you mean to cast the return value from INLINE_SYSCALL?
8<----------
Fix the build on ppc by casting the return value from INLINE_SYSCALL.
2015-08-21 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
* sysdeps/unix/sysdep.h (INLINE_SYSCALL_RETURN): Force the cast
of the return value from INLINE_SYSCALL.
---
sysdeps/unix/sysdep.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysdep.h b/sysdeps/unix/sysdep.h
index c4316db..7892ec4 100644
--- a/sysdeps/unix/sysdep.h
+++ b/sysdeps/unix/sysdep.h
@@ -78,7 +78,7 @@
used with function return. */
#ifndef INLINE_SYSCALL_RETURN
#define INLINE_SYSCALL_RETURN(name, nr, type, args...) \
- INLINE_SYSCALL (name, nr, args)
+ (type) INLINE_SYSCALL (name, nr, args)
#endif
/* Set error number and return value. It should only be used with
--
2.1.0