Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix building on OpenBSD 5.5 - 9base - revived minimalist port of Plan 9 userlan…
git clone git://git.suckless.org/9base
Log
Files
Refs
README
LICENSE
---
commit 27d866c6ab4a2349a23cb21dada9a1136f76bfc0
parent a71862d4fff6274e7b59e5d6381a05d8a1db579b
Author: sin <[email protected]>
Date: Mon, 3 Mar 2014 13:57:30 +0000
Fix building on OpenBSD 5.5
getdirentries() has been removed and instead we should use
getdents().
Diffstat:
M lib9/dirread.c | 9 +++++++++
1 file changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/lib9/dirread.c b/lib9/dirread.c
@@ -28,12 +28,21 @@ mygetdents(int fd, struct dirent *buf, int n)
return getdirentries(fd, (void*)buf, n, &off);
}
#elif defined(__OpenBSD__)
+#include <sys/param.h>
+# if OpenBSD < 201405 /* for OpenBSD 5.4 and earlier */
static int
mygetdents(int fd, struct dirent *buf, int n)
{
off_t off;
return getdirentries(fd, (void*)buf, n, &off);
}
+# else
+static int
+mygetdents(int fd, struct dirent *buf, int n)
+{
+ return getdents(fd, (void*)buf, n);
+}
+# endif
#elif defined(__sun__) || defined(__NetBSD__)
static int
mygetdents(int fd, struct dirent *buf, int n)
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.