]> Sergey Matveev's repositories - nnn.git/commitdiff
fix for glibc sys/types.h deprecation warnings (#31)
authorJohnathan Jenkins <twodopeshaggy@gmail.com>
Sun, 21 May 2017 01:21:48 +0000 (18:21 -0700)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 22 May 2017 13:57:35 +0000 (19:27 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 4cee5b33a4310e0c2dd9f341b8c32fef2df57308..ce92676459ca0dcf1ced6df9d63ae2255fd33978 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -1,6 +1,11 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/stat.h>
-#include <sys/types.h>
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
+ || defined(__APPLE__)
+# include <sys/types.h>
+#else
+# include <sys/sysmacros.h>
+#endif
 #include <sys/wait.h>
 #include <sys/statvfs.h>
 #include <sys/resource.h>