Force type cast in INLINE_SYSCALL_RETURN

Message ID 1440168612-30763-1-git-send-email-tuliom@linux.vnet.ibm.com
State Dropped
Delegated to: Tulio Magno Quites Machado Filho
Headers

Commit Message

Tulio Magno Quites Machado Filho Aug. 21, 2015, 2:50 p.m. UTC
  "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(-)
  

Patch

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