| Message ID | 1407749660-17909-1-git-send-email-alberto.milone@canonical.com |
|---|---|
| State | Accepted |
| Headers | show |
On Mon, Aug 11, 2014 at 5:34 PM, Alberto Milone <alberto.milone@canonical.com> wrote: > Signed-off-by: Alberto Milone <alberto.milone@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"); > > -- > 1.9.1 > > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 08/11/2014 05:34 PM, Alberto Milone wrote: > Signed-off-by: Alberto Milone <alberto.milone@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@canonical.com>
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");
Signed-off-by: Alberto Milone <alberto.milone@canonical.com> --- src/acpi/s3power/s3power.c | 5 +++++ src/acpi/s4/s4.c | 5 +++++ 2 files changed, 10 insertions(+)