]> err.no Git - systemd/commitdiff
[PATCH] fix udev-add.c to build properly with older versions of gcc.
authorgreg@kroah.com <greg@kroah.com>
Wed, 12 Nov 2003 11:50:33 +0000 (03:50 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:06:23 +0000 (21:06 -0700)
udev-add.c

index 9c546024055208d646db49ec0e9cdc18a51b43a8..d20e96ee72e7faeb3ebf9c2799b5035646e679e3 100644 (file)
@@ -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);