summaryrefslogtreecommitdiff
path: root/compat/hstrerror.c
diff options
context:
space:
mode:
authorLibravatar Ramsay Jones <ramsay@ramsay1.demon.co.uk>2013-04-27 19:46:17 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-28 12:26:09 -0700
commiteec7fd8bc54eacf96d0988741a0d988f374c4db9 (patch)
tree77d4694255f8560ccc16054200cfb352fbfcbecf /compat/hstrerror.c
parentcompat/nedmalloc: Fix some sparse warnings (diff)
downloadtgif-eec7fd8bc54eacf96d0988741a0d988f374c4db9.tar.xz
compat/nedmalloc: Fix compiler warnings on linux
On linux, when the build variable USE_NED_ALLOCATOR is set, gcc issues the following warnings: In file included from compat/nedmalloc/nedmalloc.c:63: .../malloc.c.h: In function 'mmap_resize': .../malloc.c.h:3762: warning: implicit declaration of function 'mremap' .../malloc.c.h: In function 'sys_trim': .../malloc.c.h:4195: warning: comparison between pointer and integer The warnings are caused by the <sys/mman.h> header not enabling the (conditional) declaration of the mremap() function. The declaration can be enabled by defining the _GNU_SOURCE symbol prior to including certain system header files. In particular, it may not be sufficient to simply define _GNU_SOURCE just prior to including the <sys/mman.h> header. (e.g. defining the symbol after including <sys/types.h> will be completely ineffective.) In order to suppress the warnings, we define the _GNU_SOURCE symbol at the start of the malloc.c.h header file. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/hstrerror.c')
0 files changed, 0 insertions, 0 deletions