Some libc5 cleanups
This commit is contained in:
parent
879d6c85af
commit
23b1e5c7df
@ -188,7 +188,7 @@ char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *f
|
|||||||
* file pointed to, so dont try and change the date or mode, lchown does
|
* file pointed to, so dont try and change the date or mode, lchown does
|
||||||
* does the right thing, but isnt available in older versions of libc */
|
* does the right thing, but isnt available in older versions of libc */
|
||||||
if (S_ISLNK(file_entry->mode)) {
|
if (S_ISLNK(file_entry->mode)) {
|
||||||
#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
|
#if (__GLIBC__ > 2) && (__GLIBC_MINOR__ > 1)
|
||||||
lchown(full_name, file_entry->uid, file_entry->gid);
|
lchown(full_name, file_entry->uid, file_entry->gid);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
@ -392,7 +392,8 @@ file_header_t *get_header_cpio(FILE *src_stream)
|
|||||||
case '1': /* "newc" header format */
|
case '1': /* "newc" header format */
|
||||||
cpio_entry = (file_header_t *) xcalloc(1, sizeof(file_header_t));
|
cpio_entry = (file_header_t *) xcalloc(1, sizeof(file_header_t));
|
||||||
sscanf(cpio_header, "%6c%8x%8x%8x%8x%8x%8lx%8lx%16c%8x%8x%8x%8c",
|
sscanf(cpio_header, "%6c%8x%8x%8x%8x%8x%8lx%8lx%16c%8x%8x%8x%8c",
|
||||||
dummy, &inode, &cpio_entry->mode, &cpio_entry->uid, &cpio_entry->gid,
|
dummy, &inode, (unsigned int*)&cpio_entry->mode,
|
||||||
|
(unsigned int*)&cpio_entry->uid, (unsigned int*)&cpio_entry->gid,
|
||||||
&nlink, &cpio_entry->mtime, &cpio_entry->size,
|
&nlink, &cpio_entry->mtime, &cpio_entry->size,
|
||||||
dummy, &major, &minor, &namesize, dummy);
|
dummy, &major, &minor, &namesize, dummy);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user