src/dm.c: define g_uuid_string_random() to not depend on Glib API 2.52
src/dm.c: define g_uuid_string_random() to not depend on Glib API 2.52

With RAUC 1.5 commit b78a6e2ddf06e3b310946e21dd29cf374abf70e4
("src/dm: add helpers to manage dm-verity devices"), the glib method
g_uuid_string_random() was used.
As this method is available in glib only starting with the 2.52 API,
this implicitly increased the minimum required glib version to at least
2.51.2.

As 1.5 is also the release that fixes CVE-2020-25860, depending on a
newer glib should be avoided if possible.

This patch adds a static definition for the g_uuid_string_random()
method (taken in a condensed form from glib 2.52.3 implementation) and
enables it when the API version 2.52 indicator macro GLIB_VERSION_2_52
is not available.

This allows building the code with pre-2.50 glib API versions again.

Signed-off-by: Enrico Joerns <a2e5f936c390f36494e46e71bcfbe365bb1e8c49@pengutronix.de>

jluebbe/rauc,rauc/rauc,jluebbe/rauc,ejoerns/rauc,rauc/rauc,jluebbe/rauc,rauc/rauc,ejoerns/rauc,ejoerns/rauc