add tty handling for FreeBSD
authorNikolai Lifanov <lifanov@mail.lifanov.com>
Wed, 6 Jul 2016 12:42:53 +0000 (08:42 -0400)
committerNikolai Lifanov <lifanov@mail.lifanov.com>
Wed, 6 Jul 2016 12:42:53 +0000 (08:42 -0400)
include/common.h
src/shared.c

index 7f3cf27..ff9cd4a 100644 (file)
 #include <mach/mach.h>
 #endif
 
+#ifdef __FreeBSD__
+#include <termios.h>
+#include <sys/ioctl.h>
+#endif
+
 typedef void *OCL_LIB;
 
 #ifdef HAVE_HWMON
index e972b7d..5033dae 100644 (file)
@@ -2387,7 +2387,7 @@ int tty_fix()
 }
 #endif
 
-#ifdef DARWIN
+#if defined(DARWIN) || defined(__FreeBSD__)
 static struct termios savemodes;
 static int havemodes = 0;