+#else // __MINGW32__
+ UUID uuid;
+ typedef RPC_STATUS (RPC_ENTRY *UuidCreateFn)(UUID *Uuid);
+
+ HMODULE rpc_library = LoadLibrary("rpcrt4.dll");
+ if (!rpc_library)
+ gold_error(_("--build-id=uuid failed: could not load rpcrt4.dll"));
+ else
+ {
+ UuidCreateFn uuid_create = reinterpret_cast<UuidCreateFn>(
+ GetProcAddress(rpc_library, "UuidCreate"));
+ if (!uuid_create)
+ gold_error(_("--build-id=uuid failed: could not find UuidCreate"));
+ else if (uuid_create(&uuid) != RPC_S_OK)
+ gold_error(_("__build_id=uuid failed: call UuidCreate() failed"));
+ FreeLibrary(rpc_library);
+ }
+ desc.assign(reinterpret_cast<const char *>(&uuid), sizeof(UUID));
+ descsz = sizeof(UUID);
+#endif // __MINGW32__