diff --git a/src/xpdev/sockwrap.h b/src/xpdev/sockwrap.h
index 1aaffbde1f3289f230c4f2750739288dba088f64..9c5c320c4a7fed8f5daaacb244bb5c34c1bf9705 100644
--- a/src/xpdev/sockwrap.h
+++ b/src/xpdev/sockwrap.h
@@ -215,7 +215,10 @@ typedef ULONG nfds_t;
 
 #endif	/* __unix__ */
 
-static inline
+static
+#ifndef __BORLANDC__
+inline
+#endif
 int socket_errno(bool normalize)
 {
 #if defined _WINSOCKAPI_