Chromium Code Reviews| Index: sandbox/linux/system_headers/i386_linux_ucontext.h |
| diff --git a/sandbox/linux/system_headers/android_i386_ucontext.h b/sandbox/linux/system_headers/i386_linux_ucontext.h |
| similarity index 81% |
| rename from sandbox/linux/system_headers/android_i386_ucontext.h |
| rename to sandbox/linux/system_headers/i386_linux_ucontext.h |
| index 868016b5570647413b3b864c0d2b8eece35ef039..0fc905fa405cd08762bb5951e26b9328ffb74a51 100644 |
| --- a/sandbox/linux/system_headers/android_i386_ucontext.h |
| +++ b/sandbox/linux/system_headers/i386_linux_ucontext.h |
| @@ -11,7 +11,16 @@ |
| // except we do use sigset_t for uc_sigmask instead of a custom type. |
| #if !defined(__BIONIC_HAVE_UCONTEXT_T) |
| +#if !defined(__native_client_nonsfi__) |
| #include <asm/sigcontext.h> |
| +#else |
| +// In PNaCl toolchain, sigcontext is not defined. So here declare it. |
| +typedef struct sigaltstack { |
| + void *ss_sp; |
| + int ss_flags; |
| + size_t ss_size; |
| +} stack_t; |
| +#endif |
| /* 80-bit floating-point register */ |
| struct _libc_fpreg { |
| @@ -68,7 +77,12 @@ typedef struct ucontext { |
| struct ucontext* uc_link; |
| stack_t uc_stack; |
| mcontext_t uc_mcontext; |
| - sigset_t uc_sigmask; |
| + // Android and PNaCl toolchain's sigset_t has only 32 bits, though Linux |
|
mdempsky
2015/04/13 18:55:07
Does this mean __fpregs_mem was previously wrong o
hidehiko
2015/04/14 11:56:41
IIUC, yes. However, it wasn't a problem, because s
|
| + // ABI requires 64 bits. |
| + union { |
| + sigset_t uc_sigmask; |
| + uint32_t kernel_sigmask[2]; |
| + }; |
| struct _libc_fpstate __fpregs_mem; |
| } ucontext_t; |