Skip to content
Browse files

Merge pull request #2608 from 4144/fixhpm

Fix redefine HPM structs in multy file plugins
  • Loading branch information
MishimaHaruna committed Jan 12, 2020
2 parents 776befc + 9736ec9 commit fe7af0adf1e06bad5da72ddfb125aa8a7799f770
Showing with 10 additions and 0 deletions.
  1. +6 −0 src/common/HPMi.h
  2. +4 −0 src/plugins/HPMHooking.h
@@ -241,9 +241,15 @@ struct HPMi_interface {
#define HPM_SYMBOL(n, s) (HPM->share((s), (n)), true)
#else // ! HERCULES_CORE
extern struct HPMi_interface HPMi_s;
extern struct HPMi_interface *HPMi;
extern void *(*import_symbol) (char *name, unsigned int pID);
HPExport struct HPMi_interface HPMi_s;
HPExport struct HPMi_interface *HPMi;
HPExport void *(*import_symbol) (char *name, unsigned int pID);
#define HPM_SYMBOL(n, s) ((s) = import_symbol((n),HPMi->pid))
#endif // !HERCULES_CORE

@@ -41,7 +41,11 @@ struct HPMHooking_core_interface {
const char *(*Hooked)(bool *fr);
#else // ! HERCULES_CORE
extern struct HPMHooking_interface HPMHooking_s;
HPExport struct HPMHooking_interface HPMHooking_s;

#include "HPMHooking/"

0 comments on commit fe7af0a

Please sign in to comment.
You can’t perform that action at this time.