From a370ccd9447752c555aeca04f64021efedde4db3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Apr 2017 17:16:19 -0700
Subject: [PATCH] Undefine REGEX for musl based systems

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 GNUmakefile | 1 -
 Makefile    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

--- a/GNUmakefile
+++ b/GNUmakefile
@@ -45,7 +45,6 @@ endif
 CC?=		gcc
 CFLAGS?=	-O2 -pipe
 CFLAGS+=	-g -Wall
-CPPFLAGS=	-DREGEX
 CPPFLAGS+=	-D_GNU_SOURCE
 CPPFLAGS+=	$(BSD_CPPFLAGS)
 LIBS=		$(CURSES_LIBS) $(BSD_LIBS)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ DPADD+=	${LIBUTIL}
 #	STARTUPFILE	-- look for and handle initialization file.
 #	MGLOG		-- debug mg internals to a log file.
 #
-CFLAGS+=-Wall -DREGEX `pkg-config --cflags-only-I ncurses`
+CFLAGS+=-Wall `pkg-config --cflags-only-I ncurses`
 
 SRCS=	autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \
 	echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
