Index: sys/compat/netbsd32/netbsd32.h =================================================================== RCS file: /home/netbsd/src/sys/compat/netbsd32/netbsd32.h,v retrieving revision 1.119 diff -p -u -r1.119 netbsd32.h --- sys/compat/netbsd32/netbsd32.h 11 Aug 2018 03:41:06 -0000 1.119 +++ sys/compat/netbsd32/netbsd32.h 15 Oct 2018 09:24:48 -0000 @@ -186,14 +186,13 @@ struct netbsd32_iovec { /* from */ typedef int32_t netbsd32_timer_t; -typedef int32_t netbsd32_time50_t; typedef netbsd32_int64 netbsd32_time_t; typedef netbsd32_pointer_t netbsd32_timerp_t; typedef netbsd32_pointer_t netbsd32_clockidp_t; typedef netbsd32_pointer_t netbsd32_timespec50p_t; struct netbsd32_timespec50 { - netbsd32_time50_t tv_sec; /* seconds */ + int32_t tv_sec; /* seconds */ netbsd32_long tv_nsec; /* and nanoseconds */ }; @@ -205,7 +204,7 @@ struct netbsd32_timespec { typedef netbsd32_pointer_t netbsd32_timeval50p_t; struct netbsd32_timeval50 { - netbsd32_time50_t tv_sec; /* seconds */ + netbsd32_long tv_sec; /* seconds */ netbsd32_long tv_usec; /* and microseconds */ }; Index: sys/compat/netbsd32/netbsd32_conv.h =================================================================== RCS file: /home/netbsd/src/sys/compat/netbsd32/netbsd32_conv.h,v retrieving revision 1.35 diff -p -u -r1.35 netbsd32_conv.h --- sys/compat/netbsd32/netbsd32_conv.h 10 May 2018 02:36:07 -0000 1.35 +++ sys/compat/netbsd32/netbsd32_conv.h 15 Oct 2018 09:24:41 -0000 @@ -56,7 +56,7 @@ netbsd32_from_timeval50(const struct tim struct netbsd32_timeval50 *tv32) { - tv32->tv_sec = (netbsd32_time50_t)tv->tv_sec; + tv32->tv_sec = (netbsd32_long)tv->tv_sec; tv32->tv_usec = (netbsd32_long)tv->tv_usec; } @@ -150,7 +150,7 @@ netbsd32_from_timespec50(const struct ti struct netbsd32_timespec50 *s32p) { - s32p->tv_sec = (netbsd32_time50_t)p->tv_sec; + s32p->tv_sec = (int32_t)p->tv_sec; s32p->tv_nsec = (netbsd32_long)p->tv_nsec; } Index: sys/compat/netbsd32/netbsd32_ioctl.c =================================================================== RCS file: /home/netbsd/src/sys/compat/netbsd32/netbsd32_ioctl.c,v retrieving revision 1.99 diff -p -u -r1.99 netbsd32_ioctl.c --- sys/compat/netbsd32/netbsd32_ioctl.c 12 Oct 2018 05:06:05 -0000 1.99 +++ sys/compat/netbsd32/netbsd32_ioctl.c 15 Oct 2018 09:03:41 -0000 @@ -1005,6 +1005,30 @@ netbsd32_do_clockctl_ntp_adjtime(struct } #endif +#ifdef COMPAT_50 +static void +netbsd32_ioctl_to_timeval50( + const struct netbsd32_timeval50 *s32p, + struct timeval50 *p, + u_long cmd) +{ + + p->tv_sec = s32p->tv_sec; + p->tv_usec = s32p->tv_usec; +} + +static void +netbsd32_ioctl_from_timeval50( + const struct timeval50 *p, + struct netbsd32_timeval50 *s32p, + u_long cmd) +{ + + s32p->tv_sec = (netbsd32_long)p->tv_sec; + s32p->tv_usec = (netbsd32_long)p->tv_usec; +} +#endif + /* * main ioctl syscall. * @@ -1339,16 +1363,28 @@ netbsd32_ioctl(struct lwp *l, const stru case BIOCSETF32: IOCTL_STRUCT_CONV_TO(BIOCSETF, bpf_program); +#ifdef COMPAT_50 +#define netbsd32_to_timeval50 netbsd32_ioctl_to_timeval50 +#define netbsd32_from_timeval50 netbsd32_ioctl_from_timeval50 + case BIOCSORTIMEOUT32: + IOCTL_STRUCT_CONV_TO(BIOCSORTIMEOUT, timeval50); + case BIOCGORTIMEOUT32: + IOCTL_STRUCT_CONV_TO(BIOCGORTIMEOUT, timeval50); +#undef netbsd32_to_timeval50 +#undef netbsd32_from_timeval50 +#endif case BIOCSTCPF32: IOCTL_STRUCT_CONV_TO(BIOCSTCPF, bpf_program); case BIOCSUDPF32: IOCTL_STRUCT_CONV_TO(BIOCSUDPF, bpf_program); case BIOCGDLTLIST32: IOCTL_STRUCT_CONV_TO(BIOCGDLTLIST, bpf_dltlist); - case BIOCSRTIMEOUT32: #define netbsd32_to_timeval(s32p, p, cmd) netbsd32_to_timeval(s32p, p) #define netbsd32_from_timeval(p, s32p, cmd) netbsd32_from_timeval(p, s32p) + case BIOCSRTIMEOUT32: IOCTL_STRUCT_CONV_TO(BIOCSRTIMEOUT, timeval); + case BIOCGRTIMEOUT32: + IOCTL_STRUCT_CONV_TO(BIOCGRTIMEOUT, timeval); #undef netbsd32_to_timeval #undef netbsd32_from_timeval Index: sys/compat/netbsd32/netbsd32_ioctl.h =================================================================== RCS file: /home/netbsd/src/sys/compat/netbsd32/netbsd32_ioctl.h,v retrieving revision 1.65 diff -p -u -r1.65 netbsd32_ioctl.h --- sys/compat/netbsd32/netbsd32_ioctl.h 11 Oct 2018 15:23:22 -0000 1.65 +++ sys/compat/netbsd32/netbsd32_ioctl.h 15 Oct 2018 07:53:11 -0000 @@ -113,10 +113,15 @@ struct netbsd32_bpf_dltlist { }; #define BIOCSETF32 _IOW('B',103, struct netbsd32_bpf_program) +#ifdef COMPAT_50 +#define BIOCSORTIMEOUT32 _IOW('B',109, struct netbsd32_timeval50) +#define BIOCGORTIMEOUT32 _IOR('B',110, struct netbsd32_timeval50) +#endif #define BIOCSTCPF32 _IOW('B',114, struct netbsd32_bpf_program) #define BIOCSUDPF32 _IOW('B',115, struct netbsd32_bpf_program) #define BIOCGDLTLIST32 _IOWR('B',119, struct netbsd32_bpf_dltlist) #define BIOCSRTIMEOUT32 _IOW('B',122, struct netbsd32_timeval) +#define BIOCGRTIMEOUT32 _IOR('B',123, struct netbsd32_timeval) struct netbsd32_wsdisplay_addscreendata {