aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johnathan Jenkins <twodopeshaggy@gmail.com>2017-05-20 18:21:48 -0700
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-05-22 19:27:35 +0530
commitab6bdbee6d86d4c5efdc09a399884f23a4580a2a (patch)
tree118d2cbe324ec7585db872261fbd0ec1360eb7b5
parent1e1518c1470e0fd83e8c80ae493be1687618223b (diff)
downloadnnn-ab6bdbee6d86d4c5efdc09a399884f23a4580a2a.tar.gz
fix for glibc sys/types.h deprecation warnings (#31)
-rw-r--r--nnn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nnn.c b/nnn.c
index 4cee5b3..ce92676 100644
--- 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>