When it comes to this program, why should we care what the arch is? Shouldn't the SYS_ and __NR numbers alone tell us if unshare() is relevant here? Also, suppose both SYS_unshare and __NR_unshare aren't defined and we're running on an i386 box. This means we'll trigger the block:
        #elif __i386__
                int do_check(void) { return kernel_is_too_old(); }
Which is totally wrong. Fix these up by ignoring the arch and boiling it all down to a corrected check for the proper define(s). See sys/syscall.h for details on SYS_ vs. __NR_.
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>,
Acked-by: Serge Hallyn <serue@us.ibm.com>,
1 file changed