From f1c8b3a435fa18c1fee722401ed6130d550b156f Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 9 Mar 2010 13:38:55 -0800 Subject: [PATCH] Fix duplicate uuid_t typedef. This typedef is being done in both lib/libefi/include/sys/uuid.h and /usr/include/uuid/uuid.h, both of which are included in lib/libefi/rdwr_efi.c. This leads to the following error: In file included from ../../lib/libefi/include/sys/efi_partition.h:29, from ../../lib/libefi/rdwr_efi.c:41: ../../lib/libefi/include/sys/uuid.h:81: error: redefinition of typedef 'uuid_t' /usr/include/uuid/uuid.h:19: note: previous declaration of 'uuid_t' was here The reason that we didn't see this before, is because of a strange feature in gcc where some types of warnings/errors are silently ignored if they come from system headers. But depending on the order of how system headers end up included, libefi's uuid.h may actually be included after uuid/uuid.h, which leads to the error above. It is safe to remove this duplicate typedef because we are already dependent on the linux uuid.h header and it's exceptionally unlikely they will ever change the size. --- lib/libefi/include/sys/uuid.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libefi/include/sys/uuid.h b/lib/libefi/include/sys/uuid.h index 9ce872e345..eab4622a6d 100644 --- a/lib/libefi/include/sys/uuid.h +++ b/lib/libefi/include/sys/uuid.h @@ -74,12 +74,8 @@ struct uuid { uint8_t node_addr[6]; }; -#define UUID_LEN 16 - #define UUID_PRINTABLE_STRING_LENGTH 37 -typedef uchar_t uuid_t[UUID_LEN]; - /* * Convert a uuid to/from little-endian format */