chg: define _GNU_SOURCE to allow CentOS 5 compilation
Without this flag, compilation fails with:
hgclient.c: In function 'hgc_open':
hgclient.c:466: error: 'O_DIRECTORY' undeclared (first use in this function)
hgclient.c:466: error: (Each undeclared identifier is reported only once
hgclient.c:466: error: for each function it appears in.)
Differential Revision: https://phab.mercurial-scm.org/D260
--- a/contrib/chg/Makefile Mon Aug 07 13:38:25 2017 +0200
+++ b/contrib/chg/Makefile Mon Aug 07 13:40:36 2017 +0200
@@ -5,7 +5,7 @@
OBJS = $(SRCS:.c=.o)
CFLAGS ?= -O2 -Wall -Wextra -pedantic -g
-CPPFLAGS ?= -D_FORTIFY_SOURCE=2
+CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
override CFLAGS += -std=gnu99
ifdef HGPATH
override CPPFLAGS += -DHGPATH=\"$(HGPATH)\"