[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error: conflicting types for ‘sbrk’

From: Eduardo A . Bustamante López
Subject: Re: Error: conflicting types for ‘sbrk’
Date: Thu, 22 Mar 2018 08:36:22 -0600
User-agent: Mutt/1.9.4 (2018-02-28)

On Wed, Mar 21, 2018 at 11:07:45AM -0300, Larissa Braz wrote:
> Hi,
>  I found the following compilation error:
> xmalloc.c:51:14: error: conflicting types for ‘sbrk’
>  extern char *sbrk();
>               ^
> In file included from xmalloc.c:29:0:
> /usr/include/unistd.h:1043:14: note: previous declaration of ‘sbrk’ was here
>  extern void *sbrk (intptr_t __delta) __THROW;
> #if defined (HAVE_SBRK) && !HAVE_DECL_SBRK
> extern char *sbrk();
> #endif

This declaration is conditional. It will only be evaluated if


These are set by the configure script based on what it can detect from your
system. It is strange that it detects a
working sbrk implementation, but no sbrk declaration.

* What source tree are you building? (i.e. git devel branch, git master branch,
* Also, are you passing any special parameters to `configure' or `make'?
* Can you share the following blocks from your config.log and config.h after
  running the configure script?

    $ grep -i 'checking for.*sbrk' config.log -A5
    configure:10615: checking for sbrk
    configure:10615: gcc -o conftest -ggdb -O0 -Wno-parentheses 
-Wno-format-security   conftest.c  >&5
    configure:10615: $? = 0
    configure:10615: result: yes
    configure:10615: checking for fpurge
    configure:10615: gcc -o conftest -ggdb -O0 -Wno-parentheses 
-Wno-format-security   conftest.c  >&5
    configure:14469: checking for working sbrk
    configure:14496: gcc -o conftest -ggdb -O0 -Wno-parentheses 
-Wno-format-security   conftest.c -ldl  >&5
    configure:14496: $? = 0
    configure:14496: ./conftest
    configure:14496: $? = 0
    configure:14506: result: yes
    $ grep SBRK config.h
    #define HAVE_DECL_SBRK 1
    #define HAVE_SBRK 1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]