]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/libarchive-util.h
po: Translated using Weblate (Hindi)
[thirdparty/systemd.git] / src / shared / libarchive-util.h
CommitLineData
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
10DLSYM_PROTOTYPE(archive_entry_free);
11DLSYM_PROTOTYPE(archive_entry_new);
12DLSYM_PROTOTYPE(archive_entry_set_ctime);
13DLSYM_PROTOTYPE(archive_entry_set_filetype);
14DLSYM_PROTOTYPE(archive_entry_set_gid);
15DLSYM_PROTOTYPE(archive_entry_set_mtime);
16DLSYM_PROTOTYPE(archive_entry_set_pathname);
17DLSYM_PROTOTYPE(archive_entry_set_perm);
18DLSYM_PROTOTYPE(archive_entry_set_rdevmajor);
19DLSYM_PROTOTYPE(archive_entry_set_rdevminor);
20DLSYM_PROTOTYPE(archive_entry_set_symlink);
21DLSYM_PROTOTYPE(archive_entry_set_size);
22DLSYM_PROTOTYPE(archive_entry_set_uid);
23DLSYM_PROTOTYPE(archive_error_string);
24DLSYM_PROTOTYPE(archive_write_close);
25DLSYM_PROTOTYPE(archive_write_data);
26DLSYM_PROTOTYPE(archive_write_free);
27DLSYM_PROTOTYPE(archive_write_header);
28DLSYM_PROTOTYPE(archive_write_new);
29DLSYM_PROTOTYPE(archive_write_open_FILE);
30DLSYM_PROTOTYPE(archive_write_open_fd);
31DLSYM_PROTOTYPE(archive_write_set_format_filter_by_ext);
32DLSYM_PROTOTYPE(archive_write_set_format_gnutar);
33
34int dlopen_libarchive(void);
35
36DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive_entry*, sym_archive_entry_free, NULL);
37DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive*, sym_archive_write_free, NULL);
38
39#else
40
41static inline int dlopen_libarchive(void) {
42 return -EOPNOTSUPP;
43}
44
45#endif