[compiler-rt] Fix build on NetBSD 9.99.44

Fix build on >= 9.99.44 after the removal of urio(4).
Add compat code for the device as NetBSD-9.0 is supported.
This commit is contained in:
Kamil Rytarowski 2020-01-31 14:54:30 +01:00
parent 31e29d4afe
commit 3a200f3f2e
3 changed files with 19 additions and 3 deletions

View File

@ -446,9 +446,6 @@ static void ioctl_table_fill() {
_(STICIO_STOPQ, NONE, 0);
/* Entries from file: dev/usb/ukyopon.h */
_(UKYOPON_IDENTIFY, WRITE, struct_ukyopon_identify_sz);
/* Entries from file: dev/usb/urio.h */
_(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz);
_(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz);
/* Entries from file: dev/usb/usb.h */
_(USB_REQUEST, READWRITE, struct_usb_ctl_request_sz);
_(USB_SETDEBUG, READ, sizeof(int));
@ -1405,6 +1402,9 @@ static void ioctl_table_fill() {
/* Entries from file: dev/filemon/filemon.h (compat <= 9.99.26) */
_(FILEMON_SET_FD, READWRITE, sizeof(int));
_(FILEMON_SET_PID, READWRITE, sizeof(int));
/* Entries from file: dev/usb/urio.h (compat <= 9.99.43) */
_(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz);
_(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz);
#undef _
} // NOLINT

View File

@ -190,7 +190,21 @@
#include <dev/sun/vuid_event.h>
#include <dev/tc/sticio.h>
#include <dev/usb/ukyopon.h>
#if !__NetBSD_Prereq__(9, 99, 44)
#include <dev/usb/urio.h>
#else
struct urio_command {
unsigned short length;
int request;
int requesttype;
int value;
int index;
void *buffer;
int timeout;
};
#define URIO_SEND_COMMAND _IOWR('U', 200, struct urio_command)
#define URIO_RECV_COMMAND _IOWR('U', 201, struct urio_command)
#endif
#include <dev/usb/usb.h>
#include <dev/usb/utoppy.h>
#include <dev/vme/xio.h>

View File

@ -256,6 +256,8 @@ END {
# Add compat entries
add_compat("dev/filemon/filemon.h (compat <= 9.99.26)", "FILEMON_SET_FD", "READWRITE", "sizeof(int)")
add_compat("", "FILEMON_SET_PID", "READWRITE", "sizeof(int)")
add_compat("dev/usb/urio.h (compat <= 9.99.43)", "URIO_SEND_COMMAND", "READWRITE", "struct_urio_command_sz")
add_compat("", "URIO_RECV_COMMAND", "READWRITE", "struct_urio_command_sz")
# Generate sanitizer_interceptors_ioctl_netbsd.inc