summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-11-12 03:50:33 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:06:23 -0700
commite308ebb70f9d1e389577c2a8829cf2d210cd6a19 (patch)
tree6c7ffe26d7aa751b11dc423d717a14a3f060682c
parentda86c7f02ffbe8c315598fb2c525dc4c3fb5dcae (diff)
[PATCH] fix udev-add.c to build properly with older versions of gcc.
-rw-r--r--udev-add.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/udev-add.c b/udev-add.c
index 9c54602405..d20e96ee72 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -74,6 +74,8 @@ static int create_node(struct udevice *dev)
{
char filename[255];
int retval = 0;
+ uid_t uid = 0;
+ gid_t gid = 0;
dev_t res;
strncpy(filename, udev_root, sizeof(filename));
@@ -133,9 +135,6 @@ static int create_node(struct udevice *dev)
dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
filename, dev->mode, dev->major, dev->minor, strerror(errno));
- uid_t uid = 0;
- gid_t gid = 0;
-
if (*dev->owner) {
char *endptr;
unsigned long id = strtoul(dev->owner, &endptr, 10);