Skip to content

Commit 41b6197

Browse files
committed
fixed build failure
1 parent 3d22176 commit 41b6197

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
{
@@ -13829,9 +13829,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
1382913829
if (arg4) {
1383013830
if (copy_from_user_timeval(&tv[0], arg4) ||
1383113831
copy_from_user_timeval(&tv[1],
13832-
arg4 + sizeof(struct target_timeval)))
13832+
arg4 + sizeof(struct target_timeval))) {
1383313833
unlock_user(p, arg3, 0);
1383413834
goto efault;
13835+
}
1383513836
tvp = tv;
1383613837
} else {
1383713838
tvp = NULL;

0 commit comments

Comments
 (0)