From f715d0546d05103bcc0d4832ff20d55884650bb0 Mon Sep 17 00:00:00 2001 From: visilii Date: Thu, 10 Apr 2025 21:56:08 +0300 Subject: [PATCH] Fixed compilation error with gcc 13.3.0 - multiple definitions of PAGESIZE in melkor.h --- src/melkor.c | 1 + src/melkor.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/melkor.c b/src/melkor.c index 2bdb4e3..efa764f 100644 --- a/src/melkor.c +++ b/src/melkor.c @@ -31,6 +31,7 @@ /* GLOBAL VARS */ FILE *logfp; struct stat elfstatinfo; +int PAGESIZE; unsigned int mode = 0; // Metadata to fuzz (parameters) unsigned int orcn = 0; // OrcN inside the for() loop. fuzz_* modules will use it through different loops unsigned int n = 5000; // Default for option -n diff --git a/src/melkor.h b/src/melkor.h index bc5114f..cb82262 100644 --- a/src/melkor.h +++ b/src/melkor.h @@ -39,7 +39,7 @@ */ typedef int (*func_ptr)(void); -int PAGESIZE; // Set at runtime with getpagesize() in melkor.c +extern int PAGESIZE; // Set at runtime with getpagesize() in melkor.c #ifndef PT_GNU_STACK #define PT_GNU_STACK 0x6474e551 // Indicates executable stack