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.
This commit is contained in:
commit
b0693ec582
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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];
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user