浏览代码

* fix for mantis 16052 RFC4122 compliance of own random GUID creation.

git-svn-id: trunk@15023 -
marco 15 年之前
父节点
当前提交
b6048862b8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      rtl/objpas/sysutils/sysutils.inc

+ 2 - 0
rtl/objpas/sysutils/sysutils.inc

@@ -628,6 +628,8 @@ begin
     Result:=SysCreateGUID(GUID);
     {$ELSE}
     GetRandomBytes(GUID,SizeOf(Guid));
+    guid.clock_seq_hi_and_reserved:=(guid.clock_seq_hi_and_reserved and $3F) + 64;
+    guid.time_hi_and_version      :=(time_hi_and_version and $0FFF)+ $4000;
     Result:=0;
     {$ENDIF}
     end;