Index: tport_tls.c
===================================================================
--- tport_tls.c	(revision 20136)
+++ tport_tls.c	(working copy)
@@ -35,6 +35,10 @@
 #include "config.h"
 
 #define OPENSSL_NO_KRB5 oh-no
+
+#include <sofia-sip/su_types.h>
+#include <sofia-sip/su.h>
+#include <sofia-sip/su_wait.h>
 
 #include <openssl/lhash.h>
 #include <openssl/bn.h>
@@ -47,10 +51,6 @@
 #include <openssl/bio.h>
 #include <openssl/opensslv.h>
 
-#include <sofia-sip/su_types.h>
-#include <sofia-sip/su.h>
-#include <sofia-sip/su_wait.h>
-
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
Index: tport_type_tls.c
===================================================================
--- tport_type_tls.c	(revision 20136)
+++ tport_type_tls.c	(working copy)
@@ -46,7 +46,20 @@
 #include <errno.h>
 #include <limits.h>
 #include <string.h>
-#include <sofia-sip/string0.h>
+#include <sofia-sip/string0.h>
+
+#if HAVE_FUNC
+#elif HAVE_FUNCTION
+#define __func__ __FUNCTION__
+#else
+static char const __func__[] = "tport_type_tls";
+#endif
+
+#if HAVE_WIN32
+#include <io.h>
+#define access(_filename, _mode) _access(_filename, _mode)
+#define R_OK 04
+#endif
 
 /* ---------------------------------------------------------------------- */
 /* TLS */
