--- configure
+++ configure
@@ -101775,8 +101775,12 @@
 $as_echo_n "checking for working ttyname_r() implementation... " >&6; }
   if test "$cross_compiling" = yes; then
 
-    { $as_echo "$as_me:$LINENO: result: no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" >&5
-$as_echo "no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" >&6; }
+#evaluated by running test program on target platform
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TTYNAME_R 1
+_ACEOF
 
 else
   cat >conftest.$ac_ext <<_ACEOF
