[Ltrace-devel] [PATCH] Define _POSIX_C_SOURCE instead of _GNU_SOURCE to get open_memstream
Edgar E. Iglesias
edgar.iglesias at gmail.com
Fri Nov 23 14:13:52 UTC 2012
On Fri, Nov 23, 2012 at 01:30:06PM +0100, Petr Machata wrote:
>
> Drop dummy uses of struct timezone, which isn't defined under POSIX 2008.
> ---
>
> Would anyone, who has uClibc handy (probably Edgar or Sedat), check
> that the following doesn't break the build on their MIPSen? We used to
> define _GNU_SOURCE to get open_memstream, but the more obvious fix
> should be to define _POSIX_C_SOURCE.
>
> This applies cleanly on top of both the current master and 0.7.0.
Hi Petr,
This is what I get with the freetz toolchain:
Making all in .
make[2]: Entering directory `/home/edgar/src/c/ltrace/ltrace-mips-freetz'
/bin/sh ./libtool --tag=CC --mode=compile mipsel-linux-gcc -DHAVE_CONFIG_H -I. -I./sysdeps/linux-gnu/mipsel -I./sysdeps/linux-gnu -I./sysdeps -I. -DSYSCONFDIR=\"/usr/local/etc\" -isystem /home/edgar/cross-mipsel-freetz/include/ -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -g -O2 -MT output.lo -MD -MP -MF .deps/output.Tpo -c -o output.lo output.c
libtool: compile: mipsel-linux-gcc -DHAVE_CONFIG_H -I. -I./sysdeps/linux-gnu/mipsel -I./sysdeps/linux-gnu -I./sysdeps -I. -DSYSCONFDIR=\"/usr/local/etc\" -isystem /home/edgar/cross-mipsel-freetz/include/ -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -g -O2 -MT output.lo -MD -MP -MF .deps/output.Tpo -c output.c -fPIC -DPIC -o .libs/output.o
cc1: warnings being treated as errors
output.c: In function 'output_right':
output.c:501: error: implicit declaration of function 'strdup'
output.c:501: error: incompatible implicit declaration of built-in function 'strdup'
output.c: In function 'delim_output':
output.c:626: error: implicit declaration of function 'open_memstream'
output.c:626: error: initialization makes pointer from integer without a cast
output.c: In function 'do_report':
output.c:658: error: implicit declaration of function 'vsnprintf'
More information about the Ltrace-devel
mailing list