mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
config/wscons: Fix build and add support for NetBSD
Signed-off-by: Nia Alarie <nia@NetBSD.org>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -54,7 +55,10 @@ struct nameint {
|
||||
char *name;
|
||||
} kbdenc[] = {
|
||||
KB_OVRENC,
|
||||
KB_ENCTAB,
|
||||
KB_ENCTAB
|
||||
#ifndef __NetBSD__
|
||||
,
|
||||
#endif
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -220,7 +224,11 @@ wscons_add_pointers(void)
|
||||
for (i = 0; i < 4; i++) {
|
||||
snprintf(devname, sizeof(devname), "%s%d", WSCONS_MOUSE_PREFIX, i);
|
||||
LogMessageVerb(X_INFO, 10, "wsmouse: checking %s\n", devname);
|
||||
fd = open_device(devnamem O_RDWR | O_NONBLOCK | O_EXCL);
|
||||
#ifdef HAVE_OPEN_DEVICE
|
||||
fd = open_device(devname, O_RDWR | O_NONBLOCK | O_EXCL);
|
||||
#else
|
||||
fd = open(devname, O_RDWR | O_NONBLOCK | O_EXCL);
|
||||
#endif
|
||||
if (fd == -1) {
|
||||
LogMessageVerb(X_WARNING, 10, "%s: %s\n", devname, strerror(errno));
|
||||
continue;
|
||||
@@ -233,9 +241,11 @@ wscons_add_pointers(void)
|
||||
}
|
||||
close(fd);
|
||||
switch (wsmouse_type) {
|
||||
#ifdef WSMOUSE_TYPE_SYNAPTICS
|
||||
case WSMOUSE_TYPE_SYNAPTICS:
|
||||
wscons_add_pointer(devname, "synaptics", ATTR_TOUCHPAD);
|
||||
break;
|
||||
#endif
|
||||
case WSMOUSE_TYPE_TPANEL:
|
||||
wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user