Index: trunk/src/VBox/Runtime/VBox/strformat-vbox.cpp
===================================================================
--- trunk/src/VBox/Runtime/VBox/strformat-vbox.cpp	(revision 11412)
+++ trunk/src/VBox/Runtime/VBox/strformat-vbox.cpp	(revision 11413)
@@ -464,6 +464,6 @@
                                            pUuid->Gen.u16TimeMid,
                                            pUuid->Gen.u16TimeHiAndVersion,
-                                           pUuid->Gen.u16ClockSeq & 0xff,
-                                           pUuid->Gen.u16ClockSeq >> 8,
+                                           pUuid->Gen.u8ClockSeqHiAndReserved,
+                                           pUuid->Gen.u8ClockSeqLow,
                                            pUuid->Gen.au8Node[0],
                                            pUuid->Gen.au8Node[1],
Index: trunk/src/VBox/Runtime/common/string/strformatrt.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 11412)
+++ trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 11413)
@@ -458,6 +458,6 @@
                                                u.pUuid->Gen.u16TimeMid,
                                                u.pUuid->Gen.u16TimeHiAndVersion,
-                                               u.pUuid->Gen.u16ClockSeq & 0xff,
-                                               u.pUuid->Gen.u16ClockSeq >> 8,
+                                               u.pUuid->Gen.u8ClockSeqHiAndReserved,
+                                               u.pUuid->Gen.u8ClockSeqLow,
                                                u.pUuid->Gen.au8Node[0],
                                                u.pUuid->Gen.au8Node[1],
Index: trunk/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp
===================================================================
--- trunk/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp	(revision 11412)
+++ trunk/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp	(revision 11413)
@@ -39,5 +39,7 @@
 
 
-/* WARNING: This implementation ASSUMES little endian. Needs testing on big endian! */
+/* WARNING: This implementation ASSUMES little endian. Does not work on big endian! */
+
+/* Remember, the time fields in the UUID must be little endian. */
 
 
@@ -48,5 +50,5 @@
 
     RTRandBytes(pUuid, sizeof(*pUuid));
-    pUuid->Gen.u16ClockSeq = (pUuid->Gen.u16ClockSeq & 0x3fff) | 0x8000;
+    pUuid->Gen.u8ClockSeqHiAndReserved = (pUuid->Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80;
     pUuid->Gen.u16TimeHiAndVersion = (pUuid->Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000;
 
Index: trunk/src/VBox/Runtime/generic/uuid-generic.cpp
===================================================================
--- trunk/src/VBox/Runtime/generic/uuid-generic.cpp	(revision 11412)
+++ trunk/src/VBox/Runtime/generic/uuid-generic.cpp	(revision 11413)
@@ -38,5 +38,7 @@
 
 
-/* WARNING: This implementation ASSUMES little endian. Needs testing on big endian! */
+/* WARNING: This implementation ASSUMES little endian. Does not work on big endian! */
+
+/* Remember, the time fields in the UUID must be little endian. */
 
 
@@ -81,6 +83,8 @@
     if (pUuid1->Gen.u16TimeHiAndVersion != pUuid2->Gen.u16TimeHiAndVersion)
         return pUuid1->Gen.u16TimeHiAndVersion < pUuid2->Gen.u16TimeHiAndVersion ? -1 : 1;
-    if (pUuid1->Gen.u16ClockSeq != pUuid2->Gen.u16ClockSeq)
-        return pUuid1->Gen.u16ClockSeq < pUuid2->Gen.u16ClockSeq ? -1 : 1;
+    if (pUuid1->Gen.u8ClockSeqHiAndReserved != pUuid2->Gen.u8ClockSeqHiAndReserved)
+        return pUuid1->Gen.u8ClockSeqHiAndReserved < pUuid2->Gen.u8ClockSeqHiAndReserved ? -1 : 1;
+    if (pUuid1->Gen.u8ClockSeqLow != pUuid2->Gen.u8ClockSeqLow)
+        return pUuid1->Gen.u8ClockSeqLow < pUuid2->Gen.u8ClockSeqLow ? -1 : 1;
     if (pUuid1->Gen.au8Node[0] != pUuid2->Gen.au8Node[0])
         return pUuid1->Gen.au8Node[0] < pUuid2->Gen.au8Node[0] ? -1 : 1;
@@ -160,9 +164,8 @@
     pszString[17] = s_achDigits[(u/*>>0*/)& 0xf];
     pszString[18] = '-';
-    u = pUuid->Gen.u16ClockSeq;
-    pszString[19] = s_achDigits[(u >>  4) & 0xf];
-    pszString[20] = s_achDigits[(u/*>>0*/)& 0xf];
-    pszString[21] = s_achDigits[(u >> 12)/*& 0xf*/];
-    pszString[22] = s_achDigits[(u >>  8) & 0xf];
+    pszString[19] = s_achDigits[pUuid->Gen.u8ClockSeqHiAndReserved >> 4];
+    pszString[20] = s_achDigits[pUuid->Gen.u8ClockSeqHiAndReserved & 0xf];
+    pszString[21] = s_achDigits[pUuid->Gen.u8ClockSeqLow >> 4];
+    pszString[22] = s_achDigits[pUuid->Gen.u8ClockSeqLow & 0xf];
     pszString[23] = '-';
     pszString[24] = s_achDigits[pUuid->Gen.au8Node[0] >> 4];
@@ -276,8 +279,10 @@
                           | (uint16_t)MY_TONUM(pszString[16]) << 4
                           | (uint16_t)MY_TONUM(pszString[17]);
-    pUuid->Gen.u16ClockSeq =(uint16_t)MY_TONUM(pszString[19]) << 4
-                          | (uint16_t)MY_TONUM(pszString[20])
-                          | (uint16_t)MY_TONUM(pszString[21]) << 12
-                          | (uint16_t)MY_TONUM(pszString[22]) << 8;
+    pUuid->Gen.u8ClockSeqHiAndReserved =
+                            (uint16_t)MY_TONUM(pszString[19]) << 4
+                          | (uint16_t)MY_TONUM(pszString[20]);
+    pUuid->Gen.u8ClockSeqLow =
+                            (uint16_t)MY_TONUM(pszString[21]) << 4
+                          | (uint16_t)MY_TONUM(pszString[22]);
     pUuid->Gen.au8Node[0] = (uint8_t)MY_TONUM(pszString[24]) << 4
                           | (uint8_t)MY_TONUM(pszString[25]);
Index: trunk/src/VBox/Runtime/testcase/tstUuid.cpp
===================================================================
--- trunk/src/VBox/Runtime/testcase/tstUuid.cpp	(revision 11412)
+++ trunk/src/VBox/Runtime/testcase/tstUuid.cpp	(revision 11413)
@@ -97,7 +97,7 @@
     Uuid3.au8[14] = 0xdc;
     Uuid3.au8[15] = 0xfe;
-    Uuid3.Gen.u16ClockSeq = (Uuid3.Gen.u16ClockSeq & 0x3fff) | 0x8000;
+    Uuid3.Gen.u8ClockSeqHiAndReserved = (Uuid3.Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80;
     Uuid3.Gen.u16TimeHiAndVersion = (Uuid3.Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000;
-    const char *pszUuid3 = "67452301-ab89-4fcd-10b2-547698badcfe";
+    const char *pszUuid3 = "67452301-ab89-4fcd-90b2-547698badcfe";
     rc = RTUuidToStr(&Uuid3, sz, sizeof(sz)); CHECK_RC();
     CHECK_EXPR(strcmp(sz, pszUuid3) == 0);
