Skip to content

Commit 5db1913

Browse files
ddalcinoqueueRAM
authored andcommitted
fixed build failure
1 parent 9dbbf36 commit 5db1913

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

linux-user/ioctls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
IOCTL(TIOCSETD, IOC_W, MK_PTR(TYPE_INT))
4848
IOCTL(TIOCGPTN, IOC_R, MK_PTR(TYPE_INT))
4949
IOCTL(TIOCSPTLCK, IOC_W, MK_PTR(TYPE_INT))
50-
#ifdef TIOCGPTPEER
50+
#if defined TIOCGPTPEER && defined TARGET_TIOCGPTPEER
5151
IOCTL_SPECIAL(TIOCGPTPEER, 0, do_ioctl_tiocgptpeer, TYPE_INT)
5252
#endif
5353
IOCTL(FIOCLEX, 0, TYPE_NULL)

linux-user/syscall.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5787,7 +5787,7 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp,
57875787
}
57885788
#endif
57895789

5790-
#ifdef TIOCGPTPEER
5790+
#if defined TIOCGPTPEER && defined TARGET_TIOCGPTPEER
57915791
static abi_long do_ioctl_tiocgptpeer(const IOCTLEntry *ie, uint8_t *buf_temp,
57925792
int fd, int cmd, abi_long arg)
57935793
{
@@ -13861,9 +13861,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
1386113861
if (arg4) {
1386213862
if (copy_from_user_timeval(&tv[0], arg4) ||
1386313863
copy_from_user_timeval(&tv[1],
13864-
arg4 + sizeof(struct target_timeval)))
13864+
arg4 + sizeof(struct target_timeval))) {
1386513865
unlock_user(p, arg3, 0);
1386613866
goto efault;
13867+
}
1386713868
tvp = tv;
1386813869
} else {
1386913870
tvp = NULL;

0 commit comments

Comments
 (0)