Index: /trunk/include/iprt/x86.h
===================================================================
--- /trunk/include/iprt/x86.h	(revision 88296)
+++ /trunk/include/iprt/x86.h	(revision 88297)
@@ -39,8 +39,10 @@
 #endif
 
-/* Workaround for Solaris sys/regset.h defining CS, DS */
+/** Workaround for Solaris sys/regset.h defining CS, DS and sys/controlregs.h
+ * defining MSR_IA32_FLUSH_CMD */
 #ifdef RT_OS_SOLARIS
 # undef CS
 # undef DS
+# undef MSR_IA32_FLUSH_CMD
 #endif
 
Index: /trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp	(revision 88296)
+++ /trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp	(revision 88297)
@@ -63,7 +63,7 @@
      */
     int cbInstance = 0;
-    int cbIface = strlen(pszIfaceName);
+    size_t cbIface = strlen(pszIfaceName);
     const char *pszEnd = pszIfaceName + cbIface - 1;
-    for (int i = 0; i < cbIface - 1; i++)
+    for (size_t i = 0; i < cbIface - 1; i++)
     {
         if (!RT_C_IS_DIGIT(*pszEnd))
@@ -333,7 +333,7 @@
      */
     int cbInstance = 0;
-    int cbIface = strlen(szIfaceName);
+    size_t cbIface = strlen(szIfaceName);
     const char *pszEnd = pszIface + cbIface - 1;
-    for (int i = 0; i < cbIface - 1; i++)
+    for (size_t i = 0; i < cbIface - 1; i++)
     {
         if (!RT_C_IS_DIGIT(*pszEnd))
Index: /trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp	(revision 88296)
+++ /trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp	(revision 88297)
@@ -336,7 +336,7 @@
      */
     int cbInstance = 0;
-    int cbIface = strlen(pszIfaceName);
+    size_t cbIface = strlen(pszIfaceName);
     const char *pszEnd = pszIfaceName + cbIface - 1;
-    for (int i = 0; i < cbIface - 1; i++)
+    for (size_t i = 0; i < cbIface - 1; i++)
     {
         if (!RT_C_IS_DIGIT(*pszEnd))
Index: /trunk/src/VBox/RDP/client-1.8.4/Makefile.kmk
===================================================================
--- /trunk/src/VBox/RDP/client-1.8.4/Makefile.kmk	(revision 88296)
+++ /trunk/src/VBox/RDP/client-1.8.4/Makefile.kmk	(revision 88297)
@@ -61,5 +61,5 @@
 # define __USE_LEGACY_PROTOTYPES__ until our buildbox is updated sufficiently
 rdesktop-vrdp_DEFS.solaris = \
-	HAVE_SYS_FILIO_H=1 RDPSND_SUN=1 HAVE_ICONV_H=1 ICONV_CONST= STAT_STATVFS64=1 _FILE_OFFSET_BITS=64 \
+	HAVE_SYS_FILIO_H=1 RDPSND_SUN=1 ICONV_CONST=const STAT_STATVFS64=1 _FILE_OFFSET_BITS=64 \
 	DIR_FD_MEMBER_NAME=dd_fd __USE_LEGACY_PROTOTYPES__ HAVE_SYS_VFS_H=1 HAVE_SYS_STATFS_H=1
 rdesktop-vrdp_DEFS.freebsd = \
Index: /trunk/src/VBox/RDP/client-1.8.4/rdesktop.c
===================================================================
--- /trunk/src/VBox/RDP/client-1.8.4/rdesktop.c	(revision 88296)
+++ /trunk/src/VBox/RDP/client-1.8.4/rdesktop.c	(revision 88297)
@@ -658,5 +658,5 @@
 			case 'u':
 				g_username = (char *) xmalloc(strlen(optarg) + 1);
-				STRNCPY(g_username, optarg, strlen(optarg) + 1);
+				strcpy(g_username, optarg);
 				username_option = 1;
 				break;
@@ -1209,5 +1209,5 @@
 			xfree(g_username);
 			g_username = (char *) xmalloc(strlen(g_redirect_username) + 1);
-			STRNCPY(g_username, g_redirect_username, strlen(g_redirect_username) + 1);
+			strcpy(g_username, g_redirect_username);
 			STRNCPY(server, g_redirect_server, sizeof(server));
 			flags |= RDP_INFO_AUTOLOGON;
@@ -1640,5 +1640,5 @@
 	if (*rest)
 		STRNCPY(buf, *rest, buflen);
-	strncat(buf, input, inputlen);
+	strncat(buf, input, buflen);
 	p = buf;
 
Index: /trunk/src/VBox/RDP/client-1.8.4/rdp.c
===================================================================
--- /trunk/src/VBox/RDP/client-1.8.4/rdp.c	(revision 88296)
+++ /trunk/src/VBox/RDP/client-1.8.4/rdp.c	(revision 88297)
@@ -39,26 +39,9 @@
 #ifdef HAVE_ICONV
 #ifdef HAVE_ICONV_H
-
-#if defined(RT_OS_SOLARIS) && !defined(_XPG6)
-# define VBOX_XPG6_TMP_DEF
-# define _XPG6
-#endif
-#if defined(RT_OS_SOLARIS) && defined(__USE_LEGACY_PROTOTYPES__)
-# define VBOX_LEGACY_PROTO_TMP_DEF
-# undef __USE_LEGACY_PROTOTYPES__
-#endif
 #include <iconv.h>
-#if defined(VBOX_XPG6_TMP_DEF)
-# undef _XPG6
-# undef VBOX_XPG6_TMP_DEF
-#endif
-#if defined(VBOX_LEGACY_PROTO_TMP_DEF)
-# define  __USE_LEGACY_PROTOTYPES__
-# undef VBOX_LEGACY_PROTO_TMP_DEF
 #endif
 
 #ifndef ICONV_CONST
 #define ICONV_CONST ""
-#endif
 #endif
 #endif
@@ -729,10 +712,10 @@
 	out_uint16(s, 0);	/* Compression types */
 	out_uint16_le(s, (g_rdp_version >= RDP_V5) ? 0x40d : 0);
-	/* Pad, according to T.128. 0x40d seems to 
+	/* Pad, according to T.128. 0x40d seems to
 	   trigger
-	   the server to start sending RDP5 packets. 
+	   the server to start sending RDP5 packets.
 	   However, the value is 0x1d04 with W2KTSK and
 	   NT4MS. Hmm.. Anyway, thankyou, Microsoft,
-	   for sending such information in a padding 
+	   for sending such information in a padding
 	   field.. */
 	out_uint16(s, 0);	/* Update capability */
Index: /trunk/src/VBox/RDP/client-1.8.4/utils.c
===================================================================
--- /trunk/src/VBox/RDP/client-1.8.4/utils.c	(revision 88296)
+++ /trunk/src/VBox/RDP/client-1.8.4/utils.c	(revision 88297)
@@ -188,5 +188,5 @@
 {
 #ifdef HAVE_ICONV
-	static iconv_t *iconv_h = (iconv_t) - 1;
+	static iconv_t iconv_h = (iconv_t) - 1;
 	if (strncmp(g_codepage, "UTF-8", strlen("UTF-8")) == 0)
 		goto pass_trough_as_is;
Index: /trunk/src/VBox/RDP/client-1.8.4/xclip.c
===================================================================
--- /trunk/src/VBox/RDP/client-1.8.4/xclip.c	(revision 88296)
+++ /trunk/src/VBox/RDP/client-1.8.4/xclip.c	(revision 88297)
@@ -44,27 +44,9 @@
 #ifdef HAVE_ICONV
 #ifdef HAVE_LANGINFO_H
-#ifdef HAVE_ICONV_H
 #include <langinfo.h>
-
-#if defined(RT_OS_SOLARIS) && !defined(_XPG6)
-# define VBOX_XPG6_TMP_DEF
-# define _XPG6
-#endif
-#if defined(RT_OS_SOLARIS) && defined(__USE_LEGACY_PROTOTYPES__)
-# define VBOX_LEGACY_PROTO_TMP_DEF
-# undef __USE_LEGACY_PROTOTYPES__
-# endif
-#include <iconv.h>
-#if defined(VBOX_XPG6_TMP_DEF)
-# undef _XPG6
-# undef VBOX_XPG6_TMP_DEF
-#endif
-#if defined(VBOX_LEGACY_PROTO_TMP_DEF)
-# define  __USE_LEGACY_PROTOTYPES__
-# undef VBOX_LEGACY_PROTO_TMP_DEF
-#endif
-
 #define USE_UNICODE_CLIPBOARD
 #endif
+#ifdef HAVE_ICONV_H
+#include <iconv.h>
 #endif
 #endif
