Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp	(revision 33836)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp	(revision 33837)
@@ -33,8 +33,10 @@
 #include <grp.h>
 #include <sys/mount.h>
-#include <mntent.h>
-#include <paths.h>
 #ifdef RT_OS_SOLARIS
-#include <sys/vfs.h>
+# include <sys/vfs.h>
+# include <sys/mnttab.h>
+#else
+# include <mntent.h>
+# include <paths.h>
 #endif
 #include <unistd.h>
@@ -50,4 +52,8 @@
 #endif
 
+#ifndef _PATH_MOUNTED
+ #define _PATH_MOUNTED "/etc/mtab"
+#endif
+
 /*******************************************************************************
 *   Global Variables                                                           *
@@ -87,5 +93,5 @@
 
 
-static bool VBoxServiceAutoMountShareIsMounted(const char *pszShare, 
+static bool VBoxServiceAutoMountShareIsMounted(const char *pszShare,
                                                char *pszMountPoint, size_t cbMountPoint)
 {
@@ -109,9 +115,9 @@
             if (!RTStrICmp(pMntEnt->mnt_fsname, pszShare))
             {
-                fMounted = RTStrPrintf(pszMountPoint, cbMountPoint, "%s", pMntEnt->mnt_dir) 
-                         ? true : false;                
+                fMounted = RTStrPrintf(pszMountPoint, cbMountPoint, "%s", pMntEnt->mnt_dir)
+                         ? true : false;
                 break;
-            }               
-        }        
+            }
+        }
         endmntent(pFh);
     }
@@ -131,10 +137,10 @@
         r = umount(pszMountPoint);
         if (r == 0)
-            break;                
+            break;
         RTThreadSleep(5000); /* Wait a while ... */
     }
     if (r == -1)
         rc = RTErrConvertFromErrno(errno);
-    return rc;       
+    return rc;
 }
 
@@ -177,10 +183,10 @@
     int rc;
     char szAlreadyMountedTo[RTPATH_MAX];
-    /* If a Shared Folder already is mounted but not to our desired mount point, 
+    /* If a Shared Folder already is mounted but not to our desired mount point,
      * do an unmount first! */
     if (   VBoxServiceAutoMountShareIsMounted(pszShareName, szAlreadyMountedTo, sizeof(szAlreadyMountedTo))
         && RTStrICmp(pszMountPoint, szAlreadyMountedTo))
     {
-        VBoxServiceVerbose(3, "VBoxServiceAutoMountWorker: Shared folder \"%s\" already mounted to \"%s\", unmounting ...\n", 
+        VBoxServiceVerbose(3, "VBoxServiceAutoMountWorker: Shared folder \"%s\" already mounted to \"%s\", unmounting ...\n",
                            pszShareName, szAlreadyMountedTo);
         rc = VBoxServiceAutoMountUnmount(szAlreadyMountedTo);
@@ -315,5 +321,5 @@
                         VBoxServiceVerbose(0, "VBoxServiceAutoMountWorker: Shared folder \"%s\" already is mounted!\n", pszShareName);
                         /* Ignore this error! */
-                        break;                                         
+                        break;
                     case EBUSY:
                         /* Ignore these errors! */
@@ -325,5 +331,5 @@
                         rc = RTErrConvertFromErrno(errno);
                         break;
-                }               
+                }
             }
         }
