diff --git a/usr.bin/xargs/Makefile b/usr.bin/xargs/Makefile index 1f33228d803..1f258ca6829 100644 --- a/usr.bin/xargs/Makefile +++ b/usr.bin/xargs/Makefile @@ -5,4 +5,8 @@ PROG= xargs SRCS= xargs.c strnsubst.c WARNS?= 4 +.if defined(BOOTSTRAPPING) +CFLAGS+=-DBOOTSTRAPPING +.endif + .include diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index d13b23a24f9..32f8a75c002 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -56,7 +56,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef BOOTSTRAPPING #include +#endif #include #include #include @@ -536,7 +538,13 @@ prompt(void) (void)fprintf(stderr, "?..."); (void)fflush(stderr); if ((response = fgetln(ttyfp, &rsize)) == NULL || - regcomp(&cre, nl_langinfo(YESEXPR), REG_BASIC) != 0) { + regcomp(&cre, +#ifdef BOOTSTRAPPING + "^[yY]", +#else + nl_langinfo(YESEXPR), +#endif + REG_BASIC) != 0) { (void)fclose(ttyfp); return (0); }