Skip to content

Commit

Permalink
Merge pull request #37 from d-we/master
Browse files Browse the repository at this point in the history
Declare Functions as "extern C"
  • Loading branch information
misc0110 authored Feb 12, 2024
2 parents 5c622d1 + ea612e6 commit 2930cfe
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 2930cfe

Please sign in to comment.