On Tue, Jan 17, 2012 at 10:31 AM, Natanael Copa <natanael.c...@gmail.com> wrote:
> On Sat, Jan 14, 2012 at 12:36 AM, Khem Raj <raj.k...@gmail.com> wrote:
>> On Fri, Jan 13, 2012 at 2:24 PM, Natanael Copa <natanael.c...@gmail.com> 
>> wrote:
>>> uclibc-0.9.32.1
>>>
>>> dev32-edge:~/testcase$ cat open_memstream.c
>>> #include <stdio.h>
>>>
>>> int main()
>>> {
>>>        return open_memstream(NULL, 0);
>>> }
>>> dev32-edge:~/testcase$ gcc -Wall -Werror open_memstream.c
>>> open_memstream.c: In function 'main':
>>> open_memstream.c:5:2: error: implicit declaration of function
>>> 'open_memstream' [-Werror=implicit-function-declaration]
>>> cc1: all warnings being treated as errors
>>>
>>> Something is wrong. open_memstream should be defined in stdio.h
>>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/open_memstream.html
>>>
>>> from the config:
>>> UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
>>>
>>> and to be sure:
>>> $ nm -D /lib/libc.so.0.9.32 | grep open_memstream
>>> 00028feb T open_memstream
>>>
>>> So open_memstream() is really there - and it work without -Wall
>>> -Werror but stdio.h header or some other define appears to be wrong.
>>>
>>> This is needed to compile libdrm-2.4.30
>>
>> What happens if you add -D_GNU_SOURCE to compiler cmdline ?
>
> $ gcc -Wall -Werror -D_GNU_SOURCE open_memstream.c
> open_memstream.c: In function 'main':
> open_memstream.c:5:2: error: return makes integer from pointer without
> a cast [-Werror]
> cc1: all warnings being treated as errors

Bah... it helps to read the error message...

Yes, it seems to work with -D_GNU_SOURCE when typecasted.

Need to figure out what in libdrm disables it or if its my cflags that
removes -std=... or something.

Thanks!


-- 
Natanael Copa
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to