diff options
author | 2020-03-30 09:24:26 +0900 | |
---|---|---|
committer | 2020-03-30 09:24:26 +0900 | |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /meta-agl-devel/meta-oem-extra-libs/recipes-core/libtar/files/oldgnu_prefix.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'meta-agl-devel/meta-oem-extra-libs/recipes-core/libtar/files/oldgnu_prefix.patch')
-rw-r--r-- | meta-agl-devel/meta-oem-extra-libs/recipes-core/libtar/files/oldgnu_prefix.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta-agl-devel/meta-oem-extra-libs/recipes-core/libtar/files/oldgnu_prefix.patch b/meta-agl-devel/meta-oem-extra-libs/recipes-core/libtar/files/oldgnu_prefix.patch new file mode 100644 index 00000000..99ab509e --- /dev/null +++ b/meta-agl-devel/meta-oem-extra-libs/recipes-core/libtar/files/oldgnu_prefix.patch @@ -0,0 +1,21 @@ +Description: Detect old-style GNU headers correctly +Author: Steinar H. Gunderson <sesse@debian.org> + +--- libtar-1.2.20.orig/lib/decode.c ++++ libtar-1.2.20/lib/decode.c +@@ -69,7 +69,14 @@ th_get_pathname(TAR *t) + return NULL; + } + +- if (t->th_buf.prefix[0] == '\0') ++ /* ++ * Old GNU headers (also used by newer GNU tar when doing incremental ++ * dumps) use the POSIX prefix field for many other things, such as ++ * mtime and ctime. New-style GNU headers don't, but also don't use the ++ * POSIX prefix field. Thus, only honor the prefix field if the archive ++ * is actually a POSIX archive. This is the same logic as GNU tar uses. ++ */ ++ if (strncmp(t->th_buf.magic, TMAGIC, TMAGLEN - 1) != 0 || t->th_buf.prefix[0] == '\0') + { + sprintf(t->th_pathname, "%.100s", t->th_buf.name); + } |