mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +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:
@ -35,7 +35,8 @@ utimensat (int fd, const char *file, const struct timespec tsp[2],
|
||||
return -1;
|
||||
}
|
||||
#ifdef __NR_utimensat
|
||||
return INLINE_SYSCALL (utimensat, 4, fd, file, tsp, flags);
|
||||
/* Avoid implicit array coercion in syscall macros. */
|
||||
return INLINE_SYSCALL (utimensat, 4, fd, file, &tsp[0], flags);
|
||||
#else
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user