Re: [PATCH] m68k: don't comment out syscalls used by glibc

Geert Uytterhoeven
2011-11-10T20:28:14Z

Hi Andreas,

On Tue, Nov 1, 2011 at 21:34, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Define again the syscalls that are used by glibc so that it is possible to
> compile a feature-complete glibc with the newest kernel headers.

I'm a bit puzzled by this. What exactly is your objective? To build a glibc that
runs on any possible kernel version ever released?

> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
> ---
>  arch/m68k/include/asm/unistd.h |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
> index 43f984e..d97234b 100644
> --- a/arch/m68k/include/asm/unistd.h
> +++ b/arch/m68k/include/asm/unistd.h
> @@ -132,10 +132,10 @@
>  #define __NR_adjtimex          124
>  #define __NR_mprotect          125
>  #define __NR_sigprocmask       126
> -/*#define __NR_create_module   127*/
> +#define __NR_create_module     127
>  #define __NR_init_module       128
>  #define __NR_delete_module     129
> -/*#define __NR_get_kernel_syms 130*/
> +#define __NR_get_kernel_syms   130
>  #define __NR_quotactl          131
>  #define __NR_getpgid           132
>  #define __NR_fchdir            133
> @@ -172,7 +172,7 @@
>  #define __NR_setresuid         164
>  #define __NR_getresuid         165
>  #define __NR_getpagesize       166
> -/*#define __NR_query_module    167*/
> +#define __NR_query_module      167

Support for the three syscalls above got removed day to day 10 years
ago, when adding support for Rusty's "In-kernel Module Loader" for
2.5.48. So I guess you need them for 2.4? I can understand that.

>  #define __NR_poll              168
>  #define __NR_nfsservctl                169
>  #define __NR_setresgid         170
> @@ -193,8 +193,8 @@
>  #define __NR_capset            185
>  #define __NR_sigaltstack       186
>  #define __NR_sendfile          187
> -/*#define __NR_getpmsg         188*/   /* some people actually want streams */
> -/*#define __NR_putpmsg         189*/   /* some people actually want streams */
> +#define __NR_getpmsg           188     /* some people actually want streams */
> +#define __NR_putpmsg           189     /* some people actually want streams */
>  #define __NR_vfork             190
>  #define __NR_ugetrlimit                191
>  #define __NR_mmap2             192

AFAIK, the upstream kernel never had an implementation for sys_{get,put}msg().
I did find "[Linux-streams] [PATCH] Linux-streams registration 2.5.46"
(http://www.mail-archive.com/linux-streams@gsyc.escet.urjc.es/msg00639.html)

2.1.115pre1 added placeholders on i386, and we just followed suit.
Why do you need these?