]> sigrok.org Git - libserialport.git/blobdiff - linux_termios.c
Fix a potential segfault in sp_get_port_handle().
[libserialport.git] / linux_termios.c
index 23c7ae96539c9d5155a243102e55e09045c9cd7d..92793df06d61b7de6d63bd3624a097e4b57ae280 100644 (file)
@@ -64,7 +64,7 @@ SP_PRIV size_t get_termios_size(void)
 #endif
 }
 
-#if defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)
+#if (defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)) && defined(HAVE_BOTHER)
 SP_PRIV int get_termios_speed(void *data)
 {
 #ifdef HAVE_TERMIOS2