Re: [PATCH 18/23] [AARCH64] ILP32: support stat syscall family

From: Andreas Schwab
Date: Wed Jun 29 2016 - 02:57:28 EST


Yury Norov <ynorov@xxxxxxxxxxxxxxxxxx> writes:

> +#ifdef __ILP32__
> +#include <endian.h>
> +struct __kernel_timespec
> + {
> + unsigned long long tv_sec; /* Seconds. */
> + long long tv_nsec; /* Nanoseconds. */
> + };
> +#define conv_timespec(u, k) do { \
> + (u)->tv_sec = (k)->tv_sec; \
> + (u)->tv_nsec = (k)->tv_nsec; \
> +} while (0)
> +#if __BYTE_ORDER == __LITTLE_ENDIAN
> +#define __type3264(type, name) \
> + type (name); type name##_pad
> +#else
> +#define __type3264(type, name) \
> + type name##_pad; type name
> +#endif
> +
> +#else
> +#define __kernel_timespec timespec
> +#define conv_timespec(u, k)
> +#define __type3264(type, name) type name
> +#endif /* __ILP32__ */

Surely conv_timespec needs to be put in an internal header.

Andreas.

--
Andreas Schwab, SUSE Labs, schwab@xxxxxxx
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."