From 353769f51e027da1f0b15d98b668c86c1cc2ff9d Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 28 Jul 2015 14:39:48 -0700 Subject: [PATCH] buildworld - Fix stage-1 build breakage * Conditionalize sort to not use the new isnan() function in the bootstrap stage where it might not exist. --- usr.bin/sort/Makefile | 6 +++++- usr.bin/sort/coll.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.bin/sort/Makefile b/usr.bin/sort/Makefile index b0faaf57ed..ddc23e9038 100644 --- a/usr.bin/sort/Makefile +++ b/usr.bin/sort/Makefile @@ -14,6 +14,10 @@ LDADD= -lmd DPADD+= ${LIBPTHREAD} LDADD+= -lpthread -CFLAGS+= -DSORT_THREADS +CFLAGS+= -DSORT_THREADS +.if defined(BOOTSTRAPPING) +CFLAGS+= -DBOOTSTRAPPING +.endif + .include diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c index 6c4efc9bc8..03af045203 100644 --- a/usr.bin/sort/coll.c +++ b/usr.bin/sort/coll.c @@ -1074,8 +1074,11 @@ huge_plus(double d, int err1) static bool is_nan(double d) { - +#ifdef BOOTSTRAPPING + return (d == NAN); +#else return ((d == NAN) || (isnan(d))); +#endif } /* -- 2.11.4.GIT