]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/glibc-2.3.6-inotify-1.patch
mc: Update to 4.8.4.
[people/pmueller/ipfire-2.x.git] / src / patches / glibc-2.3.6-inotify-1.patch
1 Submitted By: Dan Nicholson <dnicholson at linuxfromscratch dot org>
2 Date: 2006-09-01
3 Initial Package Version: 2.3.6
4 Origin: udev-096, syscall functions generated by Alexander E. Patrakov
5 Upstream Status: Added to syscall list in 2.4
6 Description: Adds inotify syscall functions for use in userspace. Minimal
7 syscall functions borrowed from udev local implementation to
8 provide system inotify support.
9 Testcase: dovecot-1.0rc2, ./configure --with-notify=inotify
10
11 diff -pNur glibc-2.3.6.orig/sysdeps/unix/sysv/linux/inotify.h glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h
12 --- glibc-2.3.6.orig/sysdeps/unix/sysv/linux/inotify.h 1970-01-01 00:00:00.000000000 +0000
13 +++ glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h 2006-08-01 05:48:27.000000000 +0000
14 @@ -0,0 +1,31 @@
15 +/*
16 + * Inode based directory notification for Linux
17 + *
18 + * Copyright (C) 2005 John McCutchan
19 + */
20 +
21 +#ifndef _SYS_INOTIFY_H
22 +#define _SYS_INOTIFY_H
23 +
24 +#include <stdint.h>
25 +#include <linux/inotify.h>
26 +#include <asm/unistd.h>
27 +
28 +extern long int syscall (long int __sysno, ...) __THROW;
29 +
30 +static inline int inotify_init(void)
31 +{
32 + return syscall(__NR_inotify_init);
33 +}
34 +
35 +static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
36 +{
37 + return syscall(__NR_inotify_add_watch, fd, name, mask);
38 +}
39 +
40 +static inline int inotify_rm_watch (int fd, uint32_t wd)
41 +{
42 + return syscall(__NR_inotify_rm_watch, fd, wd);
43 +}
44 +
45 +#endif /* _SYS_INOTIFY_H */