From 0f5ce62ba9d9c7d7957e9a0533ed962594add1ea Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 27 Sep 2014 13:11:43 +0200 Subject: [PATCH] xbps-create: fix build introduced in previous. --- bin/xbps-create/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index 5ba1411e..f9980d80 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -427,6 +427,7 @@ process_destdir(const char *mutable_files) static void write_entry(struct archive *ar, struct archive_entry *entry) { + const char *name; char *mmf; size_t mmflen, filelen; @@ -446,7 +447,8 @@ write_entry(struct archive *ar, struct archive_entry *entry) return; } - if (!xbps_mmap_file(archive_entry_sourcepath(entry), (void *)&mmf, &mmflen, &filelen)) + name = archive_entry_sourcepath(entry); + if (!xbps_mmap_file(name, (void *)&mmf, &mmflen, &filelen)) die("cannot read %s file", name); archive_write_data(ar, mmf, filelen);