aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-06-03 13:20:13 -0700
committerRob Landley <rob@landley.net>2019-06-03 18:36:39 -0500
commitc8a52bd25fac5ccec883362cb7db92cf3a504af5 (patch)
tree137136b1f7fa7367f9cf596f979c5278c5d990ce
parentfd894858261f494352b8af9ab16193ce971a564c (diff)
downloadtoybox-c8a52bd25fac5ccec883362cb7db92cf3a504af5.tar.gz
tail: fix macOS build.
Trivial breakage from the recent refactoring. Also add tail to the default config for macOS. I'm still unconvinced that CONFIG_TAIL_SEEK makes sense in a world where inotify support is always built in, but that's an argument for another day...
-rw-r--r--kconfig/macos_miniconfig2
-rw-r--r--lib/portability.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/kconfig/macos_miniconfig b/kconfig/macos_miniconfig
index ecc4a324..8978c726 100644
--- a/kconfig/macos_miniconfig
+++ b/kconfig/macos_miniconfig
@@ -105,6 +105,8 @@ CONFIG_HOSTNAME=y
CONFIG_MD5SUM=y
CONFIG_SHA1SUM=y
CONFIG_SEQ=y
+CONFIG_TAIL=y
+CONFIG_TAIL_SEEK=y
CONFIG_TOYBOX_SUID=y
CONFIG_TOYBOX_FLOAT=y
CONFIG_TOYBOX_HELP=y
diff --git a/lib/portability.c b/lib/portability.c
index 726e42a9..7f81685f 100644
--- a/lib/portability.c
+++ b/lib/portability.c
@@ -193,7 +193,7 @@ int xnotify_wait(struct xnotify *not, char **path)
if (kevent(not->kq, NULL, 0, &event, 1, NULL) != -1) {
// We get the fd for free, but still have to search for the path.
for (i = 0; i<not->count; i++) if (not->fds[i]==event.ident) {
- *path = paths[i];
+ *path = not->paths[i];
return event.ident;
}