From bd63a31aabd06325c0894f18edc1b4e4b076d347 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 30 Sep 2016 00:15:44 -0700 Subject: [PATCH] vwebp: ensure setenv() is available in stdlib.h quiets a -Wimplicit-function-declaration with some configurations of gcc (-std=c99). _POSIX_C_SOURCE is preferred over _BSD_SOURCE with newer versions of glibc Change-Id: I378bffb13ba52ff5c4bad1433090dcc387e5d507 (cherry picked from commit bfab894739cd73af8629131a7fd7b79a98e74455) --- examples/vwebp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/vwebp.c b/examples/vwebp.c index 96525afc..67a0750d 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -14,6 +14,10 @@ #include "webp/config.h" #endif +#if defined(__unix__) || defined(__CYGWIN__) +#define _POSIX_C_SOURCE 200112L // for setenv +#endif + #include #include #include