summaryrefslogtreecommitdiff
path: root/udev-add.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-03-04 00:51:28 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:08 -0700
commit5895eb31fe86619a9d9070e12bc0c970da9daf6b (patch)
treef6af1afe071145a16a22ffbd55b28b7a61ea2308 /udev-add.c
parent9fe3f9a9389bb06cf645d33cbb2b45e1f63d737c (diff)
[PATCH] fix the build for older versions of gcc
Diffstat (limited to 'udev-add.c')
-rw-r--r--udev-add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev-add.c b/udev-add.c
index c28256a5a6..9562cb5dbb 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