tags 675835 +patch
--

Hi,

setting custom serial speed is linux specific,
please use attached patch.

Petr
--- gtkterm-0.99.7~rc1.orig/src/serie.c
+++ gtkterm-0.99.7~rc1/src/serie.c
@@ -25,7 +25,9 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <unistd.h>
+#ifdef __linux__
 #include <linux/serial.h>
+#endif
 #include <errno.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
@@ -215,8 +217,12 @@
 	    break;
 
 	default:
+#ifdef __linux__
 	    set_custom_speed(config.vitesse, serial_port_fd);
 	    termios_p.c_cflag |= B38400;
+#else
+             return NULL;
+#endif	    
 
     }
 
@@ -521,6 +527,7 @@
 	tcsendbreak(serial_port_fd, 0);
 }
 
+#ifdef __linux__
 gint set_custom_speed(int speed, int port_fd)
 {
 
@@ -540,6 +547,7 @@
 
     return 0;
 }
+#endif
 
 gchar* get_port_string(void)
 {

Reply via email to