Re: [patch] Fix type errors in inotify interfaces

From: Michael Kerrisk
Date: Tue Nov 18 2008 - 15:40:18 EST


Ulrich,

Below are the changes that I believe are required in glibc.

Thanks,

Michael


diff -ruN glibc-2.9/sysdeps/unix/sysv/linux/alpha/sys/inotify.h glibc-2.9-mod/sysdeps/unix/sysv/linux/alpha/sys/inotify.h
--- glibc-2.9/sysdeps/unix/sysv/linux/alpha/sys/inotify.h 2008-07-24 23:43:59.000000000 -0500
+++ glibc-2.9-mod/sysdeps/unix/sysv/linux/alpha/sys/inotify.h 2008-11-18 15:30:53.000000000 -0500
@@ -35,7 +35,7 @@
/* Structure describing an inotify event. */
struct inotify_event
{
- int wd; /* Watch descriptor. */
+ int32_t wd; /* Watch descriptor. */
uint32_t mask; /* Watch mask. */
uint32_t cookie; /* Cookie to synchronize two events. */
uint32_t len; /* Length (including NULs) of name. */
@@ -98,7 +98,7 @@
__THROW;

/* Remove the watch specified by WD from the inotify instance FD. */
-extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+extern int inotify_rm_watch (int __fd, int __wd) __THROW;

__END_DECLS

diff -ruN glibc-2.9/sysdeps/unix/sysv/linux/sparc/sys/inotify.h glibc-2.9-mod/sysdeps/unix/sysv/linux/sparc/sys/inotify.h
--- glibc-2.9/sysdeps/unix/sysv/linux/sparc/sys/inotify.h 2008-07-24 23:48:03.000000000 -0500
+++ glibc-2.9-mod/sysdeps/unix/sysv/linux/sparc/sys/inotify.h 2008-11-18 15:31:08.000000000 -0500
@@ -35,7 +35,7 @@
/* Structure describing an inotify event. */
struct inotify_event
{
- int wd; /* Watch descriptor. */
+ int32_t wd; /* Watch descriptor. */
uint32_t mask; /* Watch mask. */
uint32_t cookie; /* Cookie to synchronize two events. */
uint32_t len; /* Length (including NULs) of name. */
@@ -98,7 +98,7 @@
__THROW;

/* Remove the watch specified by WD from the inotify instance FD. */
-extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+extern int inotify_rm_watch (int __fd, int __wd) __THROW;

__END_DECLS

diff -ruN glibc-2.9/sysdeps/unix/sysv/linux/sys/inotify.h glibc-2.9-mod/sysdeps/unix/sysv/linux/sys/inotify.h
--- glibc-2.9/sysdeps/unix/sysv/linux/sys/inotify.h 2008-07-24 23:50:41.000000000 -0500
+++ glibc-2.9-mod/sysdeps/unix/sysv/linux/sys/inotify.h 2008-11-18 15:31:23.000000000 -0500
@@ -35,7 +35,7 @@
/* Structure describing an inotify event. */
struct inotify_event
{
- int wd; /* Watch descriptor. */
+ int32_t wd; /* Watch descriptor. */
uint32_t mask; /* Watch mask. */
uint32_t cookie; /* Cookie to synchronize two events. */
uint32_t len; /* Length (including NULs) of name. */
@@ -98,7 +98,7 @@
__THROW;

/* Remove the watch specified by WD from the inotify instance FD. */
-extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+extern int inotify_rm_watch (int __fd, int __wd) __THROW;

__END_DECLS

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/