qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patc


From: Aleksandar Markovic
Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patches
Date: Fri, 28 Jun 2019 07:55:01 +0000

> From: Aleksandar Markovic
> Sent: Friday, June 28, 2019 9:46 AM
> To: Laurent Vivier; address@hidden; address@hidden
> Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous 
> patches
> 
> > From: Laurent Vivier <address@hidden>
> > Sent: Friday, June 28, 2019 9:21 AM
> > To: address@hidden; address@hidden
> > Cc: Aleksandar Markovic
> > Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of 
> > miscellaneous patches
> >
> > Le 27/06/2019 à 21:27, address@hidden a écrit :
> > > Patchew URL: https://patchew.org/> > QEMU/address@hidden/
> > >   CC      i386-linux-user/linux-user/uname.o
> > >   CCAS    i386-linux-user/linux-user/safe-syscall.o
> > >   CC      i386-linux-user/linux-user/i386/signal.o
> > > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:323:16: 
> > > error: > > conflicting types for ‘statx’
> > >   323 | _syscall5(int, statx, int, dirfd, const char *, pathname, int, 
> > > flags,
> > >       |                ^~~~~
> > > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:214:13: 
> > > note: in > > definition of macro ‘_syscall5’
> > >
> >
> > This is a real error. To avoid this you can rename it to "sys_statx"
> > (see sys_gettid() for instance).
> >
> 
> Ok, Laurent. But the root cause is a little deeper, I would say - the error 
> appears > because <sys/stat.h> is superfluously included, and glibc defines 
> statx() basically in > that header (in fact, in a headed that is always 
> included by stat.h) - hence the error, > I guess only for build systems with 
> glibc >= 2.28.
> 
> I am going to remove #include <sys/stat.h> too from the patch, is that OK, in 
> your > opinion? (and, honestly, I am almost positive this line removal is 
> sufficient for > removing build error without any name changes etc.)
> 

Let me ask you more precisely, Laurent - would this addition to the patch be 
fine, or you think something else would be better?

@@ -43,7 +43,7 @@
 #include <sys/times.h>
 #include <sys/shm.h>
 #include <sys/sem.h>
-#include <sys/stat.h>
+//#include <sys/stat.h>
 #include <sys/statfs.h>
 #include <utime.h>
 #include <sys/sysinfo.h>
@@ -320,7 +320,7 @@ _syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
  * It is assumed that struct statx is architecture independent.
  */
 #if defined(TARGET_NR_statx) && defined(__NR_statx)
-_syscall5(int, statx, int, dirfd, const char *, pathname, int, flags,
+_syscall5(int, sys_statx, int, dirfd, const char *, pathname, int, flags,
           unsigned int, mask, struct target_statx *, statxbuf)
 #endif
 
@@ -10194,7 +10194,7 @@ static abi_long do_syscall1(void *cpu_env, int num, 
abi_long arg1,
                 struct target_statx host_stx;
                 int mask = arg4;
 
-                ret = get_errno(statx(dirfd, p, flags, mask, &host_stx));
+                ret = get_errno(sys_statx(dirfd, p, flags, mask, &host_stx));
                 if (!is_error(ret)) {
                     if (host_to_target_statx(&host_stx, arg5) != 0) {
                         unlock_user(p, arg2, 0);



> Yours,
> Aleksandar
> 
> > Thanks,
> > Laurent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]