The afs_create_uuid function on Windows results in
duplicate uuids being produced. Windows provides its own
CreateUuid function. Use it when afs_create_uuid is called.
Change-Id: Id7f14b13c003fb845d90b09c3ca40cf258a53dbc
Reviewed-on: http://gerrit.openafs.org/1937
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
$(DESTDIR)\lib\afs\afsreg.lib
$(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS)
- $(DLLGUILINK) -def:libafsconf.def dnsapi.lib mpr.lib shell32.lib
+ $(DLLGUILINK) -def:libafsconf.def dnsapi.lib mpr.lib shell32.lib Rpcrt4.lib
$(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(CODESIGN_USERLAND)
$(LIBARCH)
$(MT_LIBFILE): $(MT_LIBOBJS)
- $(LIBARCH)
+ $(LIBARCH) Rpcrt4.lib
install_headers: $(INCFILES)
#include <errno.h>
#include <string.h>
#ifdef AFS_NT40_ENV
+#include <rpc.h>
#include <winsock2.h>
#include <process.h>
#else
afs_int32
afs_uuid_create(afsUUID * uuid)
{
+#ifdef AFS_NT40_ENV
+ UuidCreate((UUID *) uuid);
+#else /* AFS_NT40_ENV */
uuid_address_t eaddr;
afs_int32 got_no_time = 0, code;
uuid->clock_seq_hi_and_reserved = (clock_seq & 0x3f00) >> 8;
uuid->clock_seq_hi_and_reserved |= 0x80;
uuid_memcpy((void *)uuid->node, (void *)&eaddr, sizeof(uuid_address_t));
+#endif /* AFS_NT40_ENV */
return 0;
}