diff options
author | Elliott Hughes <enh@google.com> | 2014-10-29 23:22:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-29 23:22:30 +0000 |
commit | b0693ec58247c36a7427267783cb756cc055aed8 (patch) | |
tree | b82aae71a2cbd15ccf2dfd59f8e42090b0c0f289 | |
parent | 98d57c95bc7b0042d60b0f7f426ee40b60a67198 (diff) | |
parent | 0c4e98adbe57fc616651831c4d78c2b627ea5f5d (diff) | |
download | bionic-b0693ec58247c36a7427267783cb756cc055aed8.tar.gz |
Merge changes I0feda6b2,I22d13fde,I49d7d09d,Ice490bfe into lmp-mr1-dev
* changes:
Fix the type of u_ar0 in <sys/user.h>.
Add greg_t for arm64.
POSIX says <signal.h> gets you ucontext_t.
Add in_port_t and move it and in_addr_t to the correct header file.
-rw-r--r-- | libc/include/arpa/inet.h | 3 | ||||
-rw-r--r-- | libc/include/netinet/in.h | 4 | ||||
-rw-r--r-- | libc/include/signal.h | 3 | ||||
-rw-r--r-- | libc/include/sys/ucontext.h | 16 | ||||
-rw-r--r-- | libc/include/sys/user.h | 6 |
5 files changed, 19 insertions, 13 deletions
diff --git a/libc/include/arpa/inet.h b/libc/include/arpa/inet.h index 067be1fe9..86265bf24 100644 --- a/libc/include/arpa/inet.h +++ b/libc/include/arpa/inet.h @@ -25,6 +25,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _ARPA_INET_H_ #define _ARPA_INET_H_ @@ -34,8 +35,6 @@ __BEGIN_DECLS -typedef uint32_t in_addr_t; - in_addr_t inet_addr(const char*); int inet_aton(const char*, struct in_addr*); in_addr_t inet_lnaof(struct in_addr); diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h index bf3b498c4..44c7fc1a6 100644 --- a/libc/include/netinet/in.h +++ b/libc/include/netinet/in.h @@ -25,6 +25,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _NETINET_IN_H_ #define _NETINET_IN_H_ @@ -43,6 +44,9 @@ __BEGIN_DECLS #define INET_ADDRSTRLEN 16 +typedef uint16_t in_port_t; +typedef uint32_t in_addr_t; + extern int bindresvport (int sd, struct sockaddr_in *sin); static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; diff --git a/libc/include/signal.h b/libc/include/signal.h index f1849c5d4..e23e65b80 100644 --- a/libc/include/signal.h +++ b/libc/include/signal.h @@ -48,6 +48,9 @@ # include <linux/signal.h> #endif +#include <sys/ucontext.h> +#define __BIONIC_HAVE_UCONTEXT_T + __BEGIN_DECLS typedef int sig_atomic_t; diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h index f62380d8a..dd2a0bba6 100644 --- a/libc/include/sys/ucontext.h +++ b/libc/include/sys/ucontext.h @@ -68,11 +68,9 @@ typedef struct ucontext { struct ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; + sigset_t uc_sigmask; // Android has a wrong (smaller) sigset_t on ARM. - union { - sigset_t bionic; - uint32_t kernel[2]; - } uc_sigmask; + uint32_t __padding_rt_sigset; // The kernel adds extra padding after uc_sigmask to match glibc sigset_t on ARM. char __padding[120]; unsigned long uc_regspace[128] __attribute__((__aligned__(8))); @@ -80,6 +78,10 @@ typedef struct ucontext { #elif defined(__aarch64__) +#define NGREG 34 /* x0..x30 + sp + pc + pstate */ +typedef unsigned long greg_t; +typedef greg_t gregset_t[NGREG]; + #include <asm/sigcontext.h> typedef struct sigcontext mcontext_t; @@ -152,11 +154,9 @@ typedef struct ucontext { struct ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; + sigset_t uc_sigmask; // Android has a wrong (smaller) sigset_t on x86. - union { - sigset_t bionic; - uint32_t kernel[2]; - } uc_sigmask; + uint32_t __padding_rt_sigset; struct _libc_fpstate __fpregs_mem; } ucontext_t; diff --git a/libc/include/sys/user.h b/libc/include/sys/user.h index 66b371d50..0e368250f 100644 --- a/libc/include/sys/user.h +++ b/libc/include/sys/user.h @@ -91,7 +91,7 @@ struct user { unsigned long start_stack; long int signal; int reserved; - unsigned long u_ar0; + struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long magic; char u_comm[32]; @@ -155,7 +155,7 @@ struct user { long int signal; int reserved; int pad1; - unsigned long u_ar0; + struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long magic; char u_comm[32]; @@ -175,7 +175,7 @@ struct user { unsigned long start_data; unsigned long start_stack; long int signal; - unsigned long u_ar0; + void* u_ar0; unsigned long magic; char u_comm[32]; }; |