From: Yin Kangkai Date: Fri, 6 Aug 2010 07:08:51 +0000 (+0800) Subject: udev: fix compile warning X-Git-Tag: 174~385 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae8011a084fec398bd6e94694a5d6aca15b3c7a9;p=systemd udev: fix compile warning 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 --- 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];