# HG changeset patch # User Mathias De Maré # Date 1502106036 -7200 # Node ID 5544af8622863796a0027566f6b646e10d522c4c # Parent aa7a3f6e372976b30547c6a5f5eb8a3d01dab53c 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 diff -r aa7a3f6e3729 -r 5544af862286 contrib/chg/Makefile --- 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)\"