mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
powerpc: Fix compiler warning on some syscalls
GCC 5.0 emits an warning when using sizeof on array function parameters
and powerpc internal syscall macros add a check for such cases. More
specifically, on powerpc64 and powerpc32 sysdep.h:
if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \
__illegally_sized_syscall_arg3 (); \
And for sysdeps/unix/sysv/linux/utimensat.c build GCC emits:
error: ‘sizeof’ on array function parameter ‘tsp’ will return size of
‘const struct timespec *’
This patch uses the address of first struct member instead of the struct
itself in syscall macro.
This commit is contained in:
@@ -29,7 +29,8 @@
|
||||
int
|
||||
__utimes (const char *file, const struct timeval tvp[2])
|
||||
{
|
||||
return INLINE_SYSCALL (utimes, 2, file, tvp);
|
||||
/* Avoid implicit array coercion in syscall macros. */
|
||||
return INLINE_SYSCALL (utimes, 2, file, &tvp[0]);
|
||||
}
|
||||
|
||||
weak_alias (__utimes, utimes)
|
||||
|
||||
Reference in New Issue
Block a user