Commit e11980b0 authored by Leo's avatar Leo
Browse files

main/inotify-tools: upgrade to 3.21.9.6

Run the tests by running the `all` target in the `t` directory
parent c42bd575
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=inotify-tools
pkgver=3.20.11.0
pkgver=3.21.9.6
pkgrel=0
pkgdesc="C library and CLI tools providing a simple interface to inotify"
url="https://github.com/rvoicilas/inotify-tools"
arch="all"
license="GPL-2.0-only"
makedepends="automake autoconf libtool"
makedepends="automake autoconf libtool linux-headers"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rvoicilas/inotify-tools/archive/$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/rvoicilas/inotify-tools/archive/$pkgver.tar.gz
use-musl-fsid_t.patch
missing-include.patch
"
prepare() {
default_prepare
......@@ -27,11 +30,15 @@ build() {
}
check() {
make check
make -C t
}
package() {
make DESTDIR="$pkgdir" install
}
sha512sums="77b90e96efe0c90ab6ca4309c2f08303c2047ebddfad93ff62c616f30df8ca01102197867571047475b19b7dcc0fe369d9dd41425c2973cdc06467787098f672 inotify-tools-3.20.11.0.tar.gz"
sha512sums="
206eeebfd948499d81e6666b153cd7d9b05df618291fd3ada6479251b0773ce629c19f73117442a9093f028e294c5ba2dfa0aa4cf711510284ab7cad657da21c inotify-tools-3.21.9.6.tar.gz
2eb510d3819a7a1ddcc19891ea11737547cb2e758eaa0b41c36fb66622025a3464f40956f9dbfe352b111482b8a520c19092d72c35991261fbe0a8698cadb7ce use-musl-fsid_t.patch
bc750fa6f1ad44375d5ddeeb40fe9e3a8528ec91b07fc763184cb6f89b1e01565f027f11cfd545e22c472ba7fe092646ae459c87f85f4e381c555d1b9b1f89c6 missing-include.patch
"
diff --git a/libinotifytools/src/inotifytools.c b/libinotifytools/src/inotifytools.c
index 8bdfdb6..cade682 100644
--- a/libinotifytools/src/inotifytools.c
+++ b/libinotifytools/src/inotifytools.c
@@ -32,6 +32,7 @@
#include <time.h>
#include <regex.h>
#include <setjmp.h>
+#include <limits.h> /* for PATH_MAX */
#include "inotifytools/inotify.h"
1.
musl defines __val instead of val for fsid_t so use it instead
2.
use the size of fsid_t as __kernel_fsid_t is not available to us as musl doesn't include linux/fanotify.h
diff --git a/libinotifytools/src/inotifytools.c b/libinotifytools/src/inotifytools.c
index 8bdfdb6..42621b3 100644
--- a/libinotifytools/src/inotifytools.c
+++ b/libinotifytools/src/inotifytools.c
@@ -752,8 +752,8 @@ static const char* inotifytools_filename_from_fid(
int len = 0, name_len = 0;
// Match mount_fd from fid->fsid (and null fhandle)
- fsid.info.fsid.val[0] = fid->info.fsid.val[0];
- fsid.info.fsid.val[1] = fid->info.fsid.val[1];
+ fsid.info.fsid.__val[0] = fid->info.fsid.__val[0];
+ fsid.info.fsid.__val[1] = fid->info.fsid.__val[1];
fsid.info.hdr.info_type = FAN_EVENT_INFO_TYPE_FID;
fsid.info.hdr.len = sizeof(fsid);
watch* mnt = watch_from_fid(&fsid);
@@ -1235,7 +1235,7 @@ int inotifytools_watch_files(char const* filenames[], int events) {
return 0;
}
memcpy(&fid->info.fsid, &buf.f_fsid,
- sizeof(__kernel_fsid_t));
+ sizeof(fsid_t));
// Hash mount_fd with fid->fsid (and null fhandle)
int ret, mntid;
@@ -1251,8 +1251,8 @@ int inotifytools_watch_files(char const* filenames[], int events) {
free(dirname);
return 0;
}
- fsid->info.fsid.val[0] = fid->info.fsid.val[0];
- fsid->info.fsid.val[1] = fid->info.fsid.val[1];
+ fsid->info.fsid.__val[0] = fid->info.fsid.__val[0];
+ fsid->info.fsid.__val[1] = fid->info.fsid.__val[1];
fsid->info.hdr.info_type =
FAN_EVENT_INFO_TYPE_FID;
fsid->info.hdr.len = sizeof(*fsid);
@@ -1573,8 +1573,8 @@ more_events:
memcpy((void*)&id, fid->handle.f_handle,
sizeof(id));
printf("[fid=%x.%x.%lx;name='%s'] %s\n",
- fid->info.fsid.val[0],
- fid->info.fsid.val[1], id, name,
+ fid->info.fsid.__val[0],
+ fid->info.fsid.__val[1], id, name,
filename ?: "");
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment