* [PATCH] asm-generic: unistd.h: fixup broken macro include.
@ 2018-12-06 2:07 Guo Ren
2018-12-06 16:14 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Guo Ren @ 2018-12-06 2:07 UTC (permalink / raw)
To: arnd, joseph; +Cc: han_mao, linux-arch, Guo Ren
The broken macros make the glibc compile error. If there is no
__NR3264_fstat*, we should also removed related definitions.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Signed-off-by: Mao Han <han_mao@c-sky.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
include/uapi/asm-generic/unistd.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 538546e..c7f3321 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -760,8 +760,10 @@ __SYSCALL(__NR_rseq, sys_rseq)
#define __NR_ftruncate __NR3264_ftruncate
#define __NR_lseek __NR3264_lseek
#define __NR_sendfile __NR3264_sendfile
+#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
#define __NR_newfstatat __NR3264_fstatat
#define __NR_fstat __NR3264_fstat
+#endif
#define __NR_mmap __NR3264_mmap
#define __NR_fadvise64 __NR3264_fadvise64
#ifdef __NR3264_stat
@@ -776,8 +778,10 @@ __SYSCALL(__NR_rseq, sys_rseq)
#define __NR_ftruncate64 __NR3264_ftruncate
#define __NR_llseek __NR3264_lseek
#define __NR_sendfile64 __NR3264_sendfile
+#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
#define __NR_fstatat64 __NR3264_fstatat
#define __NR_fstat64 __NR3264_fstat
+#endif
#define __NR_mmap2 __NR3264_mmap
#define __NR_fadvise64_64 __NR3264_fadvise64
#ifdef __NR3264_stat
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] asm-generic: unistd.h: fixup broken macro include.
2018-12-06 2:07 [PATCH] asm-generic: unistd.h: fixup broken macro include Guo Ren
@ 2018-12-06 16:14 ` Arnd Bergmann
2018-12-06 17:01 ` Marcin Juszkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-12-06 16:14 UTC (permalink / raw)
To: Guo Ren
Cc: Joseph Myers, Mao Han, linux-arch, Marcin Juszkiewicz,
Linux Kernel Mailing List
On Thu, Dec 6, 2018 at 3:07 AM Guo Ren <ren_guo@c-sky.com> wrote:
>
> The broken macros make the glibc compile error. If there is no
> __NR3264_fstat*, we should also removed related definitions.
>
> Signed-off-by: Guo Ren <ren_guo@c-sky.com>
> Signed-off-by: Mao Han <han_mao@c-sky.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> ---
Thanks for the reminder!
Marcin had already sent me the same patch a while ago
and I forgot to apply it. I applied your version now, which
as a slightly better changelog, so it will be in linux-next
tomorrow, and I plan to send it after that shows no regressions.
Arnd
> include/uapi/asm-generic/unistd.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
> index 538546e..c7f3321 100644
> --- a/include/uapi/asm-generic/unistd.h
> +++ b/include/uapi/asm-generic/unistd.h
> @@ -760,8 +760,10 @@ __SYSCALL(__NR_rseq, sys_rseq)
> #define __NR_ftruncate __NR3264_ftruncate
> #define __NR_lseek __NR3264_lseek
> #define __NR_sendfile __NR3264_sendfile
> +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
> #define __NR_newfstatat __NR3264_fstatat
> #define __NR_fstat __NR3264_fstat
> +#endif
> #define __NR_mmap __NR3264_mmap
> #define __NR_fadvise64 __NR3264_fadvise64
> #ifdef __NR3264_stat
> @@ -776,8 +778,10 @@ __SYSCALL(__NR_rseq, sys_rseq)
> #define __NR_ftruncate64 __NR3264_ftruncate
> #define __NR_llseek __NR3264_lseek
> #define __NR_sendfile64 __NR3264_sendfile
> +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
> #define __NR_fstatat64 __NR3264_fstatat
> #define __NR_fstat64 __NR3264_fstat
> +#endif
> #define __NR_mmap2 __NR3264_mmap
> #define __NR_fadvise64_64 __NR3264_fadvise64
> #ifdef __NR3264_stat
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] asm-generic: unistd.h: fixup broken macro include.
2018-12-06 16:14 ` Arnd Bergmann
@ 2018-12-06 17:01 ` Marcin Juszkiewicz
0 siblings, 0 replies; 3+ messages in thread
From: Marcin Juszkiewicz @ 2018-12-06 17:01 UTC (permalink / raw)
To: Arnd Bergmann, Guo Ren
Cc: Joseph Myers, Mao Han, linux-arch, Linux Kernel Mailing List
W dniu 06.12.2018 o 17:14, Arnd Bergmann pisze:
> On Thu, Dec 6, 2018 at 3:07 AM Guo Ren <ren_guo@c-sky.com> wrote:
>>
>> The broken macros make the glibc compile error. If there is no
>> __NR3264_fstat*, we should also removed related definitions.
>>
>> Signed-off-by: Guo Ren <ren_guo@c-sky.com>
>> Signed-off-by: Mao Han <han_mao@c-sky.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> ---
>
> Thanks for the reminder!
>
> Marcin had already sent me the same patch a while ago
> and I forgot to apply it. I applied your version now, which
> as a slightly better changelog, so it will be in linux-next
> tomorrow, and I plan to send it after that shows no regressions.
One patch less to keep locally ;D
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-06 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 2:07 [PATCH] asm-generic: unistd.h: fixup broken macro include Guo Ren
2018-12-06 16:14 ` Arnd Bergmann
2018-12-06 17:01 ` Marcin Juszkiewicz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.