--- configure
+++ configure
@@ -79178,8 +79178,10 @@
 $as_echo_n "checking for working ttyname_r() implementation... " >&6; }
   if test "$cross_compiling" = yes; then :
 
-    { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+$as_echo "#define HAVE_TTYNAME_R 1" >>confdefs.h
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
