]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
use readdir() instead of the deprecated readir_r()
[libserialport.git] / libserialport_internal.h
index a5fc7bc54bcebdcc639a9dbdf8470461eb612143..669152b675339927e5b0dda0e993230c637fbe7c 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>
@@ -35,6 +37,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <limits.h>
 #ifdef _WIN32
 #include <windows.h>
 #include <tchar.h>