From c8ef43e33b6aebc603adf6db0168a74c8ed7d01e Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 6 Nov 2022 12:35:30 +0100 Subject: [PATCH] Make it C++-compatible --- minitar.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/minitar.h b/minitar.h index dcaf38b..6454e0d 100644 --- a/minitar.h +++ b/minitar.h @@ -39,12 +39,21 @@ struct minitar_entry char* ptr; }; -struct minitar* minitar_open(const char* pathname); -struct minitar_entry* minitar_read_entry(struct minitar* mp); -void minitar_free_entry(struct minitar_entry* entry); -void minitar_rewind(struct minitar* mp); -struct minitar_entry* minitar_find_by_name(struct minitar* mp, const char* name); -struct minitar_entry* minitar_find_any_of(struct minitar* mp, enum minitar_file_type type); -int minitar_close(struct minitar* mp); +#ifdef __cplusplus +extern "C" +{ +#endif + + struct minitar* minitar_open(const char* pathname); + struct minitar_entry* minitar_read_entry(struct minitar* mp); + void minitar_free_entry(struct minitar_entry* entry); + void minitar_rewind(struct minitar* mp); + struct minitar_entry* minitar_find_by_name(struct minitar* mp, const char* name); + struct minitar_entry* minitar_find_any_of(struct minitar* mp, enum minitar_file_type type); + int minitar_close(struct minitar* mp); + +#ifdef __cplusplus +} +#endif #endif \ No newline at end of file