From 987993a38d12f6de052683711e673fa6bbbdae86 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 2 Nov 2010 16:27:46 +0000 Subject: First take on changes to allow building with MSC for W32CE. Fixed regression in plain W32 build. --- src/ttyname_r.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ttyname_r.c') diff --git a/src/ttyname_r.c b/src/ttyname_r.c index 44876587..810c2175 100644 --- a/src/ttyname_r.c +++ b/src/ttyname_r.c @@ -24,10 +24,14 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif -#warning ttyname is not thread-safe, and ttyname_r is missing +#ifdef __GNUC__ +# warning ttyname is not thread-safe, and ttyname_r is missing +#endif int ttyname_r (int fd, char *buf, size_t buflen) -- cgit v1.2.3