Skip to content

Commit

Permalink
Fix Android built
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Jan 29, 2024
1 parent 58a8e91 commit bf42e83
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/term.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ version (Windows) {
private int tcsetattr(int fd, int a, termios *termios_p);
private int ioctl(int fd, ulong request, ...);
}
version (CRuntime_Bionic) {
private int tcgetattr(int __fd, termios* __t);
private int tcsetattr(int __fd, int __optional_actions, termios* __t);
}

private enum TERM_ATTR = ~(ICANON | ECHO);
private enum SIGWINCH = 28;
Expand Down
14 changes: 13 additions & 1 deletion src/adbg/include/c/setjmp.d
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ version (Windows) {
}

static assert (_JUMP_BUFFER.sizeof == _JBTYPE.sizeof * _JBLEN);
} else version (Aarch64) {
} else version (AArch64) {
private enum _JBLEN = 24;
private alias int _JTYPE;

Expand Down Expand Up @@ -161,6 +161,18 @@ version (Windows) {
ulong[128 / c_long.sizeof] __ss;
}
alias __jmp_buf_tag jmp_buf;
} else version (CRuntime_Bionic) {
version (X86) {
enum _JBLEN = 10;
} else version (X86_64) {
enum _JBLEN = 11;
} else version (ARM) {
enum _JBLEN = 64;
} else version (AArch64) {
enum _JBLEN = 32;
}

alias jmp_buf = c_long[_JBLEN];
} else static assert(0, "Missing setjmp definitions");

version (Win32) { // Required by DMD, works with LDC
Expand Down

0 comments on commit bf42e83

Please sign in to comment.