From: Szabolcs Nagy Date: Wed, 9 Apr 2014 19:32:17 +0000 (+0200) Subject: fix malloc-brk-fail and memmem-oob tests X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=commitdiff_plain;h=0b44f33283ddf8911f47a14ac4d015755af4405b fix malloc-brk-fail and memmem-oob tests --- diff --git a/src/regression/malloc-brk-fail.c b/src/regression/malloc-brk-fail.c index c89cee0..d0ccd35 100644 --- a/src/regression/malloc-brk-fail.c +++ b/src/regression/malloc-brk-fail.c @@ -1,3 +1,4 @@ +// commit 5446303328adf4b4e36d9fba21848e6feb55fab4 2014-04-02 // malloc should not fail if brk fails but mmap can still allocate #include #include @@ -32,7 +33,7 @@ int main(void) t_error("malloc did not fail with ENOMEM, got %s\n", strerror(errno)); // make some space available for mmap - T(munmap(p+65536, 65536)); + T(munmap((char*)p+65536, 65536)); // malloc should succeed now q = malloc(10000); diff --git a/src/regression/memmem-oob.c b/src/regression/memmem-oob.c index f3c57ad..2be928d 100644 --- a/src/regression/memmem-oob.c +++ b/src/regression/memmem-oob.c @@ -1,4 +1,7 @@ // memmem should not access oob data +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include #include "test.h"