ACK: [PATCH] s3power.c, s4.c: add backward compatibility with older glib releases
Alex Hung
alex.hung at canonical.com
Tue Aug 12 14:43:31 UTC 2014
On 08/11/2014 05:34 PM, Alberto Milone wrote:
> Signed-off-by: Alberto Milone <alberto.milone at canonical.com>
> ---
> src/acpi/s3power/s3power.c | 5 +++++
> src/acpi/s4/s4.c | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/src/acpi/s3power/s3power.c b/src/acpi/s3power/s3power.c
> index 275539c..c391fd9 100644
> --- a/src/acpi/s3power/s3power.c
> +++ b/src/acpi/s3power/s3power.c
> @@ -247,6 +247,11 @@ static int s3power_test(fwts_framework *fw)
>
> int (*do_suspend)(fwts_pm_method_vars *, const int, int*, const char*);
>
> +#if !GLIB_CHECK_VERSION(2,35,0)
> + /* This is for backward compatibility with old glib versions */
> + g_type_init();
> +#endif
> +
> fwts_settings = calloc(1, sizeof(fwts_pm_method_vars));
> if (fwts_settings == NULL)
> return FWTS_OUT_OF_MEMORY;
> diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
> index 8400538..2ea76bb 100644
> --- a/src/acpi/s4/s4.c
> +++ b/src/acpi/s4/s4.c
> @@ -348,6 +348,11 @@ static int s4_test_multiple(fwts_framework *fw)
> bool retried = false;
> char tmp[32];
>
> +#if !GLIB_CHECK_VERSION(2,35,0)
> + /* This is for backward compatibility with old glib versions */
> + g_type_init();
> +#endif
> +
> if (s4_multiple == 1)
> fwts_log_info(fw, "Defaulted to run 1 test, run --s4-multiple=N to run more S4 cycles\n");
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list