svn commit: r201109 - head/lib/libarchive
Tim Kientzle
kientzle at FreeBSD.org
Mon Dec 28 03:30:32 UTC 2009
Author: kientzle
Date: Mon Dec 28 03:30:31 2009
New Revision: 201109
URL: http://svn.freebsd.org/changeset/base/201109
Log:
Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r.
Modified:
head/lib/libarchive/archive_read_disk_set_standard_lookup.c
Modified: head/lib/libarchive/archive_read_disk_set_standard_lookup.c
==============================================================================
--- head/lib/libarchive/archive_read_disk_set_standard_lookup.c Mon Dec 28 03:28:21 2009 (r201108)
+++ head/lib/libarchive/archive_read_disk_set_standard_lookup.c Mon Dec 28 03:30:31 2009 (r201109)
@@ -195,6 +195,7 @@ lookup_uname_helper(struct name_cache *c
if (cache->buff == NULL)
return (NULL);
for (;;) {
+ result = &pwent; /* Old getpwuid_r ignores last arg. */
r = getpwuid_r((uid_t)id, &pwent,
cache->buff, cache->buff_size, &result);
if (r == 0)
@@ -243,6 +244,7 @@ lookup_gname_helper(struct name_cache *c
if (cache->buff == NULL)
return (NULL);
for (;;) {
+ result = &grent; /* Old getgrgid_r ignores last arg. */
r = getgrgid_r((gid_t)id, &grent,
cache->buff, cache->buff_size, &result);
if (r == 0)
More information about the svn-src-head
mailing list