$DragonFly: src/lib/libarchive/patches/Attic/archive_read_extract.c.patch,v 1.1 2004/11/10 18:02:24 joerg Exp $ --- archive_read_extract.c.orig 2004-11-09 23:59:26.000000000 +0100 +++ archive_read_extract.c 2004-11-10 00:25:17.000000000 +0100 @@ -77,7 +77,10 @@ struct bucket { char *name; int hash; - id_t id; + union { + uid_t uid; + gid_t gid; + } id; }; struct extract { @@ -1229,7 +1232,7 @@ h = hash(gname); b = &extract->gcache[h % cache_size ]; if (b->name != NULL && b->hash == h && strcmp(gname, b->name) == 0) - return ((gid_t)b->id); + return (b->id.gid); /* Free the cache slot for a new entry. */ if (b->name != NULL) @@ -1240,7 +1243,7 @@ grent = getgrnam(gname); if (grent != NULL) gid = grent->gr_gid; - b->id = gid; + b->id.gid = gid; return (gid); } @@ -1265,7 +1268,7 @@ h = hash(uname); b = &extract->ucache[h % cache_size ]; if (b->name != NULL && b->hash == h && strcmp(uname, b->name) == 0) - return ((uid_t)b->id); + return (b->id.uid); /* Free the cache slot for a new entry. */ if (b->name != NULL) @@ -1276,7 +1279,7 @@ pwent = getpwnam(uname); if (pwent != NULL) uid = pwent->pw_uid; - b->id = uid; + b->id.uid = uid; return (uid); }