mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
FreeBSD: Select inotify type (libc or linotify) based on FreeBSD version (#3579)
Starting from FreeBSD 15.0-RELEASE, FreeBSD implemented inotify system calls. So, when the OS is FreeBSD, check the version (uname -U) and select to use libc (15.0-RELEASE and later) or independent library (until 14.3-RELEASE). The FreeBSD implementation of inotify system calls do not support some of the flags that Linux equivalent supports, so modify the flags for FreeBSD. Co-authored-by: Hiroo Ono <hiroo@oikumene.net> Co-authored-by: abraunegg <alex.braunegg@gmail.com>
This commit is contained in:
parent
79d014298e
commit
40ed16bbe3
2 changed files with 9 additions and 2 deletions
|
|
@ -298,7 +298,10 @@ case "$(uname -s)" in
|
|||
bsd_inotify_LIBS=""
|
||||
;;
|
||||
FreeBSD)
|
||||
bsd_inotify_LIBS="-L/usr/local/lib -linotify"
|
||||
AS_IF([test "$(uname -U)" -gt 1500060],
|
||||
[bsd_inotify_LIBS=""],
|
||||
[bsd_inotify_LIBS="-L/usr/local/lib -linotify"]
|
||||
)
|
||||
;;
|
||||
OpenBSD)
|
||||
bsd_inotify_LIBS="-L/usr/local/lib/inotify -linotify"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,11 @@ import log;
|
|||
import clientSideFiltering;
|
||||
|
||||
// Relevant inotify events
|
||||
private immutable uint32_t mask = IN_CLOSE_WRITE | IN_CREATE | IN_DELETE | IN_MOVE | IN_IGNORED | IN_Q_OVERFLOW;
|
||||
version(FreeBSD) {
|
||||
private immutable uint32_t mask = IN_CLOSE_WRITE | IN_CREATE | IN_DELETE | IN_MOVE;
|
||||
} else {
|
||||
private immutable uint32_t mask = IN_CLOSE_WRITE | IN_CREATE | IN_DELETE | IN_MOVE | IN_IGNORED | IN_Q_OVERFLOW;
|
||||
}
|
||||
|
||||
class MonitorException: ErrnoException {
|
||||
@safe this(string msg, string file = __FILE__, size_t line = __LINE__) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue