From: Junio C Hamano Date: Wed, 25 Feb 2015 22:52:26 GMT Subject: Re: [PATCH v9 1/1] http: Add Accept-Language header if possible Message-ID: In-Reply-To: <1422446677-8415-2-git-send-email-eungjun.yi@navercorp.com> Yi EungJun writes: > From: Yi EungJun > > Add an Accept-Language header which indicates the user's preferred > languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. > ... > Signed-off-by: Yi EungJun > --- Yikes. This is now in 'master', but I wonder if people are getting compilation errors because of this change. I do. It introduces a call to setlocale() without causing to be included, and runs afoul of -Wimplicit-function-declaration. Other call sites of setlocale() are in gettext.c, which does include the header at the beginning. > diff --git a/http.c b/http.c > index 040f362..b2ad2a8 100644 > --- a/http.c > +++ b/http.c > ... > +#ifndef NO_GETTEXT > + retval = setlocale(LC_MESSAGES, NULL); > + if (retval && *retval && > + strcmp(retval, "C") && > + strcmp(retval, "POSIX")) > + return retval; > +#endif I really do not like a conditional inclusion of system header files inside any *.c file, but here is a minimum emergency fix-up I am running with today. It should go to somewhere in git-compat-util.h. Somebody care to throw a tested fix-up patch at me? Thanks. http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http.c b/http.c index efdab09..7e79cbd 100644 --- a/http.c +++ b/http.c @@ -9,6 +9,10 @@ #include "version.h" #include "pkt-line.h" +#ifndef NO_GETTEXT +#include +#endif + int active_requests; int http_is_verbose; size_t http_post_buffer = 16 * LARGE_PACKET_MAX;