Skip to content

Commit

Permalink
app/memcmp: fix compilation on Ubuntu 20.04.
Browse files Browse the repository at this point in the history
Fixes:
main.c: In function ‘fault_handler’:
main.c:134:9: error: a label can only be part of a statement and a declaration
is not a statement
  • Loading branch information
jovanbulck committed May 29, 2024
1 parent 64c123a commit 1856d6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/memcmp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ void aep_cb_func(void)
/* Called upon SIGSEGV caused by untrusted page tables. */
void fault_handler(int signo, siginfo_t * si, void *ctx)
{
ucontext_t *uc = (ucontext_t *) ctx;

switch ( signo )
{
case SIGSEGV:
Expand Down Expand Up @@ -131,7 +133,6 @@ void fault_handler(int signo, siginfo_t * si, void *ctx)
#endif

/* ensure RFLAGS.TF is clear to disable debug single-stepping */
ucontext_t *uc = (ucontext_t *) ctx;
uc->uc_mcontext.gregs[REG_EFL] &= ~0x100;
break;
#endif
Expand Down

0 comments on commit 1856d6b

Please sign in to comment.