Skip to content

Commit

Permalink
Update engine.c
Browse files Browse the repository at this point in the history
  • Loading branch information
f0rb1dd3n authored Feb 4, 2019
1 parent dab7383 commit 0385998
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions khook/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,18 @@ static void __khook_init(khook_t *s)

while (s->length < 5) {
struct insn insn;
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) || (defined RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 0))))
#ifdef RHEL_RELEASE_CODE
#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 0)
insn_api.init(&insn, s->target + s->length, MAX_INSN_SIZE, x86_64);
#else
#else
insn_api.init(&insn, s->target + s->length, x86_64);
#endif
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
insn_api.init(&insn, s->target + s->length, MAX_INSN_SIZE, x86_64);
#else
insn_api.init(&insn, s->target + s->length, x86_64);
#endif
#endif
insn_api.get_length(&insn);
s->length += insn.length;
Expand Down

0 comments on commit 0385998

Please sign in to comment.