]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Linux: fix for alpha where BOTHER is not defined.
[libserialport.git] / libserialport_internal.h
index a0d872bb8ed8bd8f9f2b854470965a694a107089..308b20b34a5e069aad428f9b7719c3edb36c517b 100644 (file)
@@ -23,7 +23,9 @@
 
 
 #ifdef __linux__
-#define _BSD_SOURCE /* For timeradd, timersub, timercmp. */
+/* For timeradd, timersub, timercmp. */
+#define _BSD_SOURCE 1 /* for glibc < 2.19 */
+#define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */
 #endif
 
 #include <string.h>
@@ -83,7 +85,7 @@
 #endif
 
 /* Non-standard baudrates are not available everywhere. */
-#if (defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)) && defined(HAVE_DECL_BOTHER)
+#if (defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)) && HAVE_DECL_BOTHER
 #define USE_TERMIOS_SPEED
 #endif