diff --git a/dtool/src/build/Makefile.o.rules b/dtool/src/build/Makefile.o.rules index 67c8c15b8f..65f804e841 100644 --- a/dtool/src/build/Makefile.o.rules +++ b/dtool/src/build/Makefile.o.rules @@ -71,9 +71,12 @@ else CFILES := $(CFILES) $(LCFILES) endif +# We must strip out the reference to unistd.h that flex so annoyingly +# puts in its generated code. $(LCFILES) : %.$(LEXTENSION) : %.lxx $(LEX) $(LFLAGS) $< - mv lex.yy.c $@ + sed '/#include /d' lex.yy.c > $@ + rm lex.yy.c clean:: rm -f $(LCFILES)