Skip to content

Commit

Permalink
explicitly declare functions as "extern C"
Browse files Browse the repository at this point in the history
  • Loading branch information
d-we committed Feb 12, 2024
1 parent 5c622d1 commit ea612e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ptedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#ifndef _PTEDITOR_H_
#define _PTEDITOR_H_

#ifdef __cplusplus
extern "C" {
#endif

#define ptedit_fnc

#include "module/pteditor.h"
Expand Down Expand Up @@ -812,4 +816,8 @@ ptedit_fnc void ptedit_print_entry_line(size_t entry, int line);

/** @} */

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions ptedit_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit ea612e6

Please sign in to comment.