mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-31 05:41:08 +00:00
Add kqueue() support for recent versions of -stable as well now that
they have it.
This commit is contained in:
parent
8cb3192e67
commit
2e87553923
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=28774
@ -1,10 +1,12 @@
|
||||
--- check_tmp.c.orig Fri Sep 24 13:33:35 1999
|
||||
+++ check_tmp.c Tue Apr 25 00:57:56 2000
|
||||
@@ -38,6 +38,13 @@
|
||||
+++ check_tmp.c Mon May 22 23:49:21 2000
|
||||
@@ -37,7 +37,14 @@
|
||||
char error_buffer[256];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#if __FreeBSD_version >= 500001
|
||||
-
|
||||
+
|
||||
+#if (__FreeBSD_version >= 500001) || (__FreeBSD_version >= 400019 && __FreeBSD_version < 500000)
|
||||
+ struct kevent ev;
|
||||
+ struct kevent *evp;
|
||||
+ int fd;
|
||||
@ -18,7 +20,7 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+#if __FreeBSD_version >= 500001
|
||||
+#if (__FreeBSD_version >= 500001) || (__FreeBSD_version >= 400019 && __FreeBSD_version < 500000)
|
||||
+ /* Set up the KQ on the target directory */
|
||||
+ fd = dirfd(dirp);
|
||||
+
|
||||
@ -42,7 +44,7 @@
|
||||
|
||||
while (1){
|
||||
+
|
||||
+#if __FreeBSD_version >= 500001
|
||||
+#if (__FreeBSD_version >= 500001) || (__FreeBSD_version >= 400019 && __FreeBSD_version < 500000)
|
||||
+ if (ev.fflags & NOTE_WRITE) {
|
||||
+#endif
|
||||
while ((dp = readdir(dirp)) != NULL){
|
||||
@ -59,7 +61,7 @@
|
||||
list = prunelist(list);
|
||||
rewinddir(dirp);
|
||||
+
|
||||
+#if __FreeBSD_version >= 500001
|
||||
+#if (__FreeBSD_version >= 500001) || (__FreeBSD_version >= 400019 && __FreeBSD_version < 500000)
|
||||
+ /* Reset event so we don't trigger on the rewinddir */
|
||||
+ kevent(kq, 1, &evp, 0, NULL, &ts);
|
||||
+
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- check_tmp.h.orig Thu Dec 24 07:40:13 1998
|
||||
+++ check_tmp.h Tue Apr 25 00:29:52 2000
|
||||
+++ check_tmp.h Mon May 22 23:45:37 2000
|
||||
@@ -1,16 +1,22 @@
|
||||
#ifndef __CHECK_TMP_H
|
||||
#define __CHECK_TMP_H
|
||||
@ -20,7 +20,7 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
+#if __FreeBSD_version >= 500001
|
||||
+#if (__FreeBSD_version >= 500001) || (__FreeBSD_version >= 400019 && __FreeBSD_version < 500000)
|
||||
+#include <sys/event.h>
|
||||
+#include <sys/time.h>
|
||||
+#include <err.h>
|
||||
|
Loading…
Reference in New Issue
Block a user