Skip to content

Commit

Permalink
[ANDROID] Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Dec 27, 2024
1 parent ae512cc commit f36f9d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
20 changes: 10 additions & 10 deletions src/include/signals.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ typedef struct x64_sigaction_s {
void (*sa_restorer)(void);
} x64_sigaction_t;

#ifdef ANDROID
typedef struct android_sigaction_s {
int sa_flags;
typedef struct x64_sigaction_restorer_s {
union {
sighandler_t _sa_handler;
void (*_sa_sigaction)(int, siginfo_t *, void *);
} _u;
sigset_t sa_mask;
uint32_t sa_flags;
void (*sa_restorer)(void);
} android_sigaction_t;
#endif
sigset_t sa_mask;
} x64_sigaction_restorer_t;

typedef struct x64_sigaction_restorer_s {
#ifdef ANDROID
typedef struct android_sigaction_s {
int sa_flags;
union {
sighandler_t _sa_handler;
void (*_sa_sigaction)(int, siginfo_t *, void *);
} _u;
uint32_t sa_flags;
void (*sa_restorer)(void);
sigset_t sa_mask;
} x64_sigaction_restorer_t;
void (*sa_restorer)(void);
} android_sigaction_t;
#endif

#ifdef BOX32
typedef struct __attribute__((packed)) i386_sigaction_s {
Expand Down
4 changes: 0 additions & 4 deletions src/libtools/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -2129,11 +2129,7 @@ int EXPORT my___sigaction(x64emu_t* emu, int signum, const x64_sigaction_t *act,
#endif
__attribute__((alias("my_sigaction")));

#ifdef ANDROID
int EXPORT my_syscall_rt_sigaction(x64emu_t* emu, int signum, const android_sigaction_restorer_t *act, android_sigaction_restorer_t *oldact, int sigsetsize)
#else
int EXPORT my_syscall_rt_sigaction(x64emu_t* emu, int signum, const x64_sigaction_restorer_t *act, x64_sigaction_restorer_t *oldact, int sigsetsize)
#endif
{
printf_log(LOG_DEBUG, "Syscall/Sigaction(signum=%d, act=%p, old=%p, size=%d)\n", signum, act, oldact, sigsetsize);
if(signum<0 || signum>MAX_SIGNAL) {
Expand Down

0 comments on commit f36f9d2

Please sign in to comment.