From: azarah@nosferatu.za.org Date: Tue, 30 Dec 2003 09:18:28 +0000 (-0800) Subject: [PATCH] Fix udev gcc-2.95.4 compat X-Git-Tag: 012~18 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8ed89229bc8afed84ad6d587a6df29329bbbf440 [PATCH] Fix udev gcc-2.95.4 compat Two liner to get gcc-2.95.4 to compile udev. --- diff --git a/namedev.c b/namedev.c index e69eba657..cff338f1a 100644 --- a/namedev.c +++ b/namedev.c @@ -655,9 +655,9 @@ static struct sysfs_device *get_sysfs_device(struct sysfs_class_device *class_de if (isdigit(class_dev->path[strlen(class_dev->path)-1])) { temp = strrchr(filename, '/'); if (temp) { + char *temp2 = strrchr(filename, '/'); partition = 1; *temp = 0x00; - char *temp2 = strrchr(filename, '/'); dbg("temp2 = %s", temp2); if (temp2 && (strcmp(temp2, "/block") == 0)) { /* oops, we have no parent block device, so go back to original directory */