On 08/21/2018 05:50 PM, Laurent Vivier wrote: > I don't understand why you need/want to duplicate the list of syscalls here. > > If I modify your patch as following, it works without duplicating the list: > > diff --git a/linux-user/syscall-file.def.c b/linux-user/syscall-file.def.c > new file mode 100644 > index 0000000000..78b1bd0467 > --- /dev/null > +++ b/linux-user/syscall-file.def.c > @@ -0,0 +1,13 @@ > +SYSCALL_DEF(close, ARG_DEC); > +#ifdef TARGET_NR_open > +SYSCALL_DEF(open, ARG_STR, ARG_OPENFLAG, ARG_MODEFLAG); > +#endif > +SYSCALL_DEF(openat, ARG_ATDIRFD, ARG_STR, ARG_OPENFLAG, ARG_MODEFLAG); > +SYSCALL_DEF(read, ARG_DEC, ARG_PTR, ARG_DEC); > +#ifdef TARGET_NR_readlink > +SYSCALL_DEF(readlink, ARG_STR, ARG_PTR, ARG_DEC); > +#endif > +#ifdef TARGET_NR_readlinkat > +SYSCALL_DEF(readlinkat, ARG_ATDIRFD, ARG_STR, ARG_PTR, ARG_DEC); > +#endif > +SYSCALL_DEF(write, ARG_DEC, ARG_PTR, ARG_DEC);
Sort-of interesting, but I do have other definitions of syscall structures that do not use this macro. Please look through e.g. patch 15 and suggest how I might define mmap2 with your scheme. r~