From ae8011a084fec398bd6e94694a5d6aca15b3c7a9 Mon Sep 17 00:00:00 2001 From: Yin Kangkai Date: Fri, 6 Aug 2010 15:08:51 +0800 Subject: [PATCH] udev: fix compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CC udev/udevd.o In file included from udev/udev.h:27, from udev/udevd.c:47: ./libudev/libudev-private.h: In function ‘udev_selinux_setfscreateconat’: ./libudev/libudev-private.h:230: warning: declaration of ‘dirfd’ shadows a global declaration /usr/include/dirent.h:224: warning: shadowed declaration is here Signed-off-by: Yin Kangkai Signed-off-by: Martin Pitt --- libudev/libudev-private.h | 4 ++-- libudev/libudev-selinux-private.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h index fa408f6a..475f992b 100644 --- a/libudev/libudev-private.h +++ b/libudev/libudev-private.h @@ -227,14 +227,14 @@ static inline void udev_selinux_init(struct udev *udev) {} static inline void udev_selinux_exit(struct udev *udev) {} static inline void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode) {} static inline void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode) {} -static inline void udev_selinux_setfscreateconat(struct udev *udev, int dirfd, const char *file, unsigned int mode) {} +static inline void udev_selinux_setfscreateconat(struct udev *udev, int dfd, const char *file, unsigned int mode) {} static inline void udev_selinux_resetfscreatecon(struct udev *udev) {} #else void udev_selinux_init(struct udev *udev); void udev_selinux_exit(struct udev *udev); void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode); void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode); -void udev_selinux_setfscreateconat(struct udev *udev, int dirfd, const char *file, unsigned int mode); +void udev_selinux_setfscreateconat(struct udev *udev, int dfd, const char *file, unsigned int mode); void udev_selinux_resetfscreatecon(struct udev *udev); #endif diff --git a/libudev/libudev-selinux-private.c b/libudev/libudev-selinux-private.c index 2d4463d8..be68aa1c 100644 --- a/libudev/libudev-selinux-private.c +++ b/libudev/libudev-selinux-private.c @@ -83,7 +83,7 @@ void udev_selinux_resetfscreatecon(struct udev *udev) err(udev, "setfscreatecon failed: %m\n"); } -void udev_selinux_setfscreateconat(struct udev *udev, int dirfd, const char *file, unsigned int mode) +void udev_selinux_setfscreateconat(struct udev *udev, int dfd, const char *file, unsigned int mode) { char filename[UTIL_PATH_SIZE]; -- 2.39.5