]>
Commit | Line | Data |
---|---|---|
b68f4cad LP |
1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | #pragma once | |
3 | ||
4 | #include "dlfcn-util.h" | |
5 | ||
6 | #if HAVE_LIBARCHIVE | |
7 | #include <archive.h> | |
8 | #include <archive_entry.h> | |
9 | ||
10 | DLSYM_PROTOTYPE(archive_entry_free); | |
11 | DLSYM_PROTOTYPE(archive_entry_new); | |
12 | DLSYM_PROTOTYPE(archive_entry_set_ctime); | |
13 | DLSYM_PROTOTYPE(archive_entry_set_filetype); | |
14 | DLSYM_PROTOTYPE(archive_entry_set_gid); | |
15 | DLSYM_PROTOTYPE(archive_entry_set_mtime); | |
16 | DLSYM_PROTOTYPE(archive_entry_set_pathname); | |
17 | DLSYM_PROTOTYPE(archive_entry_set_perm); | |
18 | DLSYM_PROTOTYPE(archive_entry_set_rdevmajor); | |
19 | DLSYM_PROTOTYPE(archive_entry_set_rdevminor); | |
20 | DLSYM_PROTOTYPE(archive_entry_set_symlink); | |
21 | DLSYM_PROTOTYPE(archive_entry_set_size); | |
22 | DLSYM_PROTOTYPE(archive_entry_set_uid); | |
23 | DLSYM_PROTOTYPE(archive_error_string); | |
24 | DLSYM_PROTOTYPE(archive_write_close); | |
25 | DLSYM_PROTOTYPE(archive_write_data); | |
26 | DLSYM_PROTOTYPE(archive_write_free); | |
27 | DLSYM_PROTOTYPE(archive_write_header); | |
28 | DLSYM_PROTOTYPE(archive_write_new); | |
29 | DLSYM_PROTOTYPE(archive_write_open_FILE); | |
30 | DLSYM_PROTOTYPE(archive_write_open_fd); | |
31 | DLSYM_PROTOTYPE(archive_write_set_format_filter_by_ext); | |
32 | DLSYM_PROTOTYPE(archive_write_set_format_gnutar); | |
33 | ||
34 | int dlopen_libarchive(void); | |
35 | ||
36 | DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive_entry*, sym_archive_entry_free, NULL); | |
37 | DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive*, sym_archive_write_free, NULL); | |
38 | ||
39 | #else | |
40 | ||
41 | static inline int dlopen_libarchive(void) { | |
42 | return -EOPNOTSUPP; | |
43 | } | |
44 | ||
45 | #endif |