]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Add some additional formatting hints to Doxygen comments.
[libserialport.git] / libserialport_internal.h
index d784472bb12d0c218413d645ff38e3dec8588da3..35aa6f9ab703d13f932f1cc3f921672887fc2319 100644 (file)
@@ -26,6 +26,8 @@
 /* For timeradd, timersub, timercmp, realpath. */
 #define _BSD_SOURCE 1 /* for glibc < 2.19 */
 #define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */
+/* For clock_gettime and associated types. */
+#define _POSIX_C_SOURCE 199309L
 #endif
 
 #include <string.h>
@@ -66,8 +68,9 @@
 #endif
 #ifdef __linux__
 #include <dirent.h>
-#ifndef __ANDROID__
-#include "linux/serial.h"
+/* Android only has linux/serial.h from platform 21 onwards. */
+#if !(defined(__ANDROID__) && (__ANDROID_API__ < 21))
+#include <linux/serial.h>
 #endif
 #include "linux_termios.h"