diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
commit | 78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch) | |
tree | f515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/shared/libarchive-util.h | |
parent | Adding debian version 255.5-1. (diff) | |
download | systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip |
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/libarchive-util.h')
-rw-r--r-- | src/shared/libarchive-util.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/shared/libarchive-util.h b/src/shared/libarchive-util.h new file mode 100644 index 0000000..8003da9 --- /dev/null +++ b/src/shared/libarchive-util.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include "dlfcn-util.h" + +#if HAVE_LIBARCHIVE +#include <archive.h> +#include <archive_entry.h> + +DLSYM_PROTOTYPE(archive_entry_free); +DLSYM_PROTOTYPE(archive_entry_new); +DLSYM_PROTOTYPE(archive_entry_set_ctime); +DLSYM_PROTOTYPE(archive_entry_set_filetype); +DLSYM_PROTOTYPE(archive_entry_set_gid); +DLSYM_PROTOTYPE(archive_entry_set_mtime); +DLSYM_PROTOTYPE(archive_entry_set_pathname); +DLSYM_PROTOTYPE(archive_entry_set_perm); +DLSYM_PROTOTYPE(archive_entry_set_rdevmajor); +DLSYM_PROTOTYPE(archive_entry_set_rdevminor); +DLSYM_PROTOTYPE(archive_entry_set_symlink); +DLSYM_PROTOTYPE(archive_entry_set_size); +DLSYM_PROTOTYPE(archive_entry_set_uid); +DLSYM_PROTOTYPE(archive_error_string); +DLSYM_PROTOTYPE(archive_write_close); +DLSYM_PROTOTYPE(archive_write_data); +DLSYM_PROTOTYPE(archive_write_free); +DLSYM_PROTOTYPE(archive_write_header); +DLSYM_PROTOTYPE(archive_write_new); +DLSYM_PROTOTYPE(archive_write_open_FILE); +DLSYM_PROTOTYPE(archive_write_open_fd); +DLSYM_PROTOTYPE(archive_write_set_format_filter_by_ext); +DLSYM_PROTOTYPE(archive_write_set_format_gnutar); + +int dlopen_libarchive(void); + +DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive_entry*, sym_archive_entry_free, NULL); +DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive*, sym_archive_write_free, NULL); + +#else + +static inline int dlopen_libarchive(void) { + return -EOPNOTSUPP; +} + +#endif |