From: greg@kroah.com Date: Thu, 4 Mar 2004 08:51:28 +0000 (-0800) Subject: [PATCH] fix the build for older versions of gcc X-Git-Tag: 022~35 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5895eb31fe86619a9d9070e12bc0c970da9daf6b;p=systemd [PATCH] fix the build for older versions of gcc --- diff --git a/udev-add.c b/udev-add.c index c28256a5..9562cb5d 100644 --- a/udev-add.c +++ b/udev-add.c @@ -226,10 +226,11 @@ static int create_node(struct udevice *dev, int fake) if (endptr[0] == '\0') uid = (uid_t) id; else { + struct passwd *pw; if (strncmp(dev->owner, LOCAL_USER, sizeof(LOCAL_USER)) == 0) set_to_local_user(dev->owner); - struct passwd *pw = getpwnam(dev->owner); + pw = getpwnam(dev->owner); if (pw == NULL) dbg("specified user unknown '%s'", dev->owner); else