OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/uClibc-0.9.31-add-inotify-init1.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From a2e5630af426f85fdd8721b2820786d9bd2aa695 Mon Sep 17 00:00:00 2001
  17. From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
  18. Date: Tue, 1 Jun 2010 20:02:54 +0400
  19. Subject: [PATCH] inotify: add inotify_init1 system call support
  20. This patch introduces support for inotify_init1 system call, found
  21. since Linux 2.6.27.
  22. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
  23. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  24. ---
  25. libc/sysdeps/linux/common/inotify.c | 4 ++++
  26. libc/sysdeps/linux/common/sys/inotify.h | 13 +++++++++++++
  27. 2 files changed, 17 insertions(+), 0 deletions(-)
  28. diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c
  29. index e5a6120..e35f043 100644
  30. --- a/libc/sysdeps/linux/common/inotify.c
  31. +++ b/libc/sysdeps/linux/common/inotify.c
  32. @@ -15,6 +15,10 @@
  33. _syscall0(int, inotify_init)
  34. #endif
  35. +#ifdef __NR_inotify_init1
  36. +_syscall1(int, inotify_init1, int, flags)
  37. +#endif
  38. +
  39. #ifdef __NR_inotify_add_watch
  40. _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
  41. #endif
  42. diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h
  43. index 0131db9..dc4e19d 100644
  44. --- a/libc/sysdeps/linux/common/sys/inotify.h
  45. +++ b/libc/sysdeps/linux/common/sys/inotify.h
  46. @@ -22,6 +22,16 @@
  47. #include <stdint.h>
  48. +/* Flags for the parameter of inotify_init1. */
  49. +enum
  50. + {
  51. + IN_CLOEXEC = 02000000,
  52. +#define IN_CLOEXEC IN_CLOEXEC
  53. + IN_NONBLOCK = 04000
  54. +#define IN_NONBLOCK IN_NONBLOCK
  55. + };
  56. +
  57. +
  58. /* Structure describing an inotify event. */
  59. struct inotify_event
  60. {
  61. @@ -79,6 +89,9 @@ __BEGIN_DECLS
  62. /* Create and initialize inotify instance. */
  63. extern int inotify_init (void) __THROW;
  64. +/* Create and initialize inotify instance. */
  65. +extern int inotify_init1 (int __flags) __THROW;
  66. +
  67. /* Add watch of object NAME to inotify instance FD. Notify about
  68. events specified by MASK. */
  69. extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
  70. --
  71. 1.7.3.4