aboutsummaryrefslogtreecommitdiffstats
path: root/src/ttyname_r.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-11-02 16:27:46 +0000
committerWerner Koch <[email protected]>2010-11-02 16:27:46 +0000
commit987993a38d12f6de052683711e673fa6bbbdae86 (patch)
treefd71f8e2a821a54a0f4c0b2243f5ad4c74683c97 /src/ttyname_r.c
parent2010-10-28 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-987993a38d12f6de052683711e673fa6bbbdae86.tar.gz
gpgme-987993a38d12f6de052683711e673fa6bbbdae86.zip
First take on changes to allow building with MSC for W32CE.
Fixed regression in plain W32 build.
Diffstat (limited to 'src/ttyname_r.c')
-rw-r--r--src/ttyname_r.c8
1 files changed, 6 insertions, 2 deletions
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 <stdlib.h>
#include <errno.h>
#include <string.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#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)