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

Re: [libvirt] [PATCH] virprocess: Introduce our own setns() wrapper



On Sun, Sep 14, 2014 at 06:35:19PM +0100, Ian Campbell wrote:
> On Wed, 2014-09-10 at 12:20 +0200, Michal Privoznik wrote:
> >  
> > +/*
> > + * Workaround older glibc. While kernel may support the setns
> > + * syscall, the glibc wrapper might not exist. If that's the
> > + * case, use our own.
> > + */
> > +#ifndef __NR_setns
> > +# if defined(__x86_64__)
> > +#  define __NR_setns 308
> > +# elif defined(__i386__)
> > +#  define __NR_setns 346
> > +# else
> > +#  error "__NR_setns is not defined"
> > +# endif
> > +#endif
> 
> Xen's automated build tests of libvirt have just failed with this when
> building for armhf:
>         util/virprocess.c:75:4: error: #error "__NR_setns is not
>         defined"
> 
> is this another aspect of the "out of date glibc" issue?

IIUC, the syscalls numbers come from the kernel headers, while the syscall
API comes from glibc. Either way, we should not have left this as a fatal
#error. I'll dig up the required constants for all other architectures we
care about.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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