This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 9a8847eba10d6b209ca72089a161c93c863fadde
Author: zhengyu16 <[email protected]>
AuthorDate: Mon Jan 26 20:53:33 2026 +0800

    libarchive: add CONFIG_UTILS_LIBARCHIVE_SYMLINK
    
    Disabling it saves 0.35K under LTO.
    
    Signed-off-by: zhengyu16 <[email protected]>
    Signed-off-by: tengshuangshuang <[email protected]>
---
 .../0010-add-config-utils-libarchive-symlink.patch | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/system/libarchive/0010-add-config-utils-libarchive-symlink.patch 
b/system/libarchive/0010-add-config-utils-libarchive-symlink.patch
new file mode 100644
index 000000000..f5f673fed
--- /dev/null
+++ b/system/libarchive/0010-add-config-utils-libarchive-symlink.patch
@@ -0,0 +1,23 @@
+diff --git a/libarchive/archive_read_support_format_zip.c 
b/libarchive/archive_read_support_format_zip.c
+index 8ec8e36f..280e1a0d 100644
+--- a/libarchive/archive_read_support_format_zip.c
++++ b/libarchive/archive_read_support_format_zip.c
+@@ -1201,6 +1201,7 @@ zip_read_local_file_header(struct archive_read *a, 
struct archive_entry *entry,
+       archive_entry_set_ctime(entry, zip_entry->ctime, 0);
+       archive_entry_set_atime(entry, zip_entry->atime, 0);
+ 
++#ifdef CONFIG_UTILS_LIBARCHIVE_SYMLINK
+       if ((zip->entry->mode & AE_IFMT) == AE_IFLNK) {
+               size_t linkname_length;
+ 
+@@ -1307,7 +1308,9 @@ zip_read_local_file_header(struct archive_read *a, 
struct archive_entry *entry,
+                           "Read error skipping symlink target name");
+                       return ARCHIVE_FATAL;
+               }
+-      } else if (0 == (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
++      } else
++#endif /* CONFIG_UTILS_LIBARCHIVE_SYMLINK */
++      if (0 == (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
+          || (zip_entry->uncompressed_size > 0
+              && zip_entry->uncompressed_size != 0xffffffff)) {
+               /* Set the size only if it's meaningful. */

Reply via email to