diff --git a/ChangeLog b/ChangeLog index f0d2dee18a7c155444d48c31c285b22c57505904..81ef8f1ff971b5a0750ec3b5487271f6286a48c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -182,7 +182,8 @@ CVS code - do_credits() - Use nanosleep() instead of usleep(). The latter is only standard under BSD, whereas the former is POSIX compliant. - (DLR) + Accordingly, only include time.h if we use this function, i.e, + if NANO_EXTRA is defined. (DLR) - Add explanatory comment. (DLR) - faq.html: - Fixed inaccuracy: multibuffer mode was first in nano 1.1.0, diff --git a/src/winio.c b/src/winio.c index fc9359b1117046e3edcff05f24d81fa5b975a4c4..c33a2ecb09cb2ceb208839fd5161c994d408dd2b 100644 --- a/src/winio.c +++ b/src/winio.c @@ -24,13 +24,16 @@ #include <stdarg.h> #include <string.h> #include <stdlib.h> -#include <time.h> #include <unistd.h> #include <ctype.h> #include <assert.h> #include "proto.h" #include "nano.h" +#ifdef NANO_EXTRA +#include <time.h> +#endif + static int statblank = 0; /* Number of keystrokes left after we call statusbar(), before we actually blank the statusbar */