Naive, untested approach for plan9port:

Index: patches/patch-src_lib9_dirread_c
===================================================================
RCS file: patches/patch-src_lib9_dirread_c
diff -N patches/patch-src_lib9_dirread_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_lib9_dirread_c    15 Aug 2013 20:45:57 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+--- src/lib9/dirread.c.orig    Thu Aug 15 22:43:44 2013
++++ src/lib9/dirread.c Thu Aug 15 22:45:50 2013
+@@ -18,14 +18,14 @@ mygetdents(int fd, struct dirent *buf, int n)
+       nn = getdirentries(fd, (void*)buf, n, &off);
+       return nn;
+ }
+-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(__APPLE__) || defined(__FreeBSD__)
+ static int
+ mygetdents(int fd, struct dirent *buf, int n)
+ {
+       long off;
+       return getdirentries(fd, (void*)buf, n, &off);
+ }
+-#elif defined(__sun__) || defined(__NetBSD__)
++#elif defined(__sun__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ static int
+ mygetdents(int fd, struct dirent *buf, int n)
+ {

Reply via email to