Explorar o código

linux-user: Fix build if headers don't define _LINUX_CAPABILITY_VERSION_1

Older kernel headers don't define _LINUX_CAPABILITY_VERSION_1.
Switch to using the older _LINUX_CAPABILITY_VERSION; newer headers
still define this for source compatibility.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Acked-by: Riku Voipio <riku.voipio@iki.fi>
Peter Maydell %!s(int64=11) %!d(string=hai) anos
pai
achega
ec864874bd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      linux-user/syscall.c

+ 1 - 1
linux-user/syscall.c

@@ -7698,7 +7698,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         header.version = tswap32(target_header->version);
         header.version = tswap32(target_header->version);
         header.pid = tswap32(target_header->pid);
         header.pid = tswap32(target_header->pid);
 
 
-        if (header.version != _LINUX_CAPABILITY_VERSION_1) {
+        if (header.version != _LINUX_CAPABILITY_VERSION) {
             /* Version 2 and up takes pointer to two user_data structs */
             /* Version 2 and up takes pointer to two user_data structs */
             data_items = 2;
             data_items = 2;
         }
         }