| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/x11-drivers/xf86-input-wacom/files/ |
Upload File : |
--- tools/tools-shared.c~
+++ tools/tools-shared.c
@@ -23,7 +23,9 @@
#include <errno.h>
#include <fcntl.h>
+#ifdef __linux__
#include <linux/serial.h>
+#endif
#include <getopt.h>
#include <poll.h>
#include <stdio.h>
@@ -51,7 +53,6 @@ void version(void)
int open_device(const char *path)
{
int fd;
- struct serial_struct ser;
TRACE("Opening device '%s'.\n", path);
fd = open(path, O_RDWR | O_NOCTTY);
@@ -59,7 +60,13 @@ int open_device(const char *path)
if (fd < 1)
perror("Failed to open device file");
+#ifdef __linux__
+ struct serial_struct ser;
if (ioctl(fd, TIOCGSERIAL, &ser) == -1)
+#else
+ struct termios termAttr;
+ if (tcgetattr(fd, &termAttr) == -1)
+#endif
{
perror("Not a serial device?");
close(fd);