about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile6
-rw-r--r--src/afl-fuzz-redqueen.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index f6b76a6c..88816e85 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -255,17 +255,17 @@ endif
 
 ifneq "$(findstring FreeBSD, $(SYS))" ""
   override CFLAGS  += -pthread
-  override LDFLAGS += -lpthread
+  override LDFLAGS += -lpthread -lm
 endif
 
 ifneq "$(findstring NetBSD, $(SYS))" ""
   override CFLAGS  += -pthread
-  override LDFLAGS += -lpthread
+  override LDFLAGS += -lpthread -lm
 endif
 
 ifneq "$(findstring OpenBSD, $(SYS))" ""
   override CFLAGS  += -pthread
-  override LDFLAGS += -lpthread
+  override LDFLAGS += -lpthread -lm
 endif
 
 COMM_HDR    = include/alloc-inl.h include/config.h include/debug.h include/types.h
diff --git a/src/afl-fuzz-redqueen.c b/src/afl-fuzz-redqueen.c
index ca5104c0..509f66a3 100644
--- a/src/afl-fuzz-redqueen.c
+++ b/src/afl-fuzz-redqueen.c
@@ -2525,6 +2525,7 @@ static u8 rtn_fuzz(afl_state_t *afl, u32 key, u8 *orig_buf, u8 *buf, u8 *cbuf,
     */
 
 #ifdef _DEBUG
+    u32 j;
     struct cmp_header *hh = &afl->orig_cmp_map->headers[key];
     fprintf(stderr, "RTN N hits=%u id=%u shape=%u attr=%u v0=", h->hits, h->id,
             hshape, h->attribute);