From ea612e6005b0b3d353de6f39209bfef81ff7cccd Mon Sep 17 00:00:00 2001 From: Daniel Weber Date: Mon, 12 Feb 2024 15:47:10 +0100 Subject: [PATCH] explicitly declare functions as "extern C" --- ptedit.h | 8 ++++++++ ptedit_header.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ptedit.h b/ptedit.h index 6f7d74c..6b59c3f 100644 --- a/ptedit.h +++ b/ptedit.h @@ -3,6 +3,10 @@ #ifndef _PTEDITOR_H_ #define _PTEDITOR_H_ +#ifdef __cplusplus +extern "C" { +#endif + #define ptedit_fnc #include "module/pteditor.h" @@ -812,4 +816,8 @@ ptedit_fnc void ptedit_print_entry_line(size_t entry, int line); /** @} */ +#ifdef __cplusplus +} +#endif + #endif diff --git a/ptedit_header.h b/ptedit_header.h index bd3148d..4d984a2 100644 --- a/ptedit_header.h +++ b/ptedit_header.h @@ -5,6 +5,10 @@ #ifndef PTEDITOR_MODULE_H #define PTEDITOR_MODULE_H +#ifdef __cplusplus +extern "C" { +#endif + #if defined(__linux__) || defined(__linux) || defined(__unix__) || defined(LINUX) || defined(UNIX) #define LINUX #endif @@ -1887,3 +1891,7 @@ ptedit_fnc void ptedit_pte_set_pfn(void* address, pid_t pid, size_t pfn) { vm.valid = PTEDIT_VALID_MASK_PTE; ptedit_update(address, pid, &vm); } + +#ifdef __cplusplus +} +#endif