From ee223e8ec80866646f6e9d7d6dab427bbb277803 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 10 Feb 2023 13:16:01 +0000 Subject: [PATCH] gtimezone: Avoid a nested preprocessor conditional to be nice to g-i GObject-Introspection seems to become confused by the nested conditional followed by an `#elif` clause for the outer conditional, and issues this warning: .../gtimezone.c:830: mismatched #elif defined (G_OS_WIN32) Signed-off-by: Simon McVittie --- glib/gtimezone.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/glib/gtimezone.c b/glib/gtimezone.c index 20f99a621..4a4a2d010 100644 --- a/glib/gtimezone.c +++ b/glib/gtimezone.c @@ -445,9 +445,7 @@ zone_for_constant_offset (GTimeZone *gtz, const gchar *name) gtz->transitions = NULL; } -#ifdef G_OS_UNIX - -#if defined(__sun) && defined(__SVR4) +#if defined(G_OS_UNIX) && defined(__sun) && defined(__SVR4) /* * only used by Illumos distros or Solaris < 11: parse the /etc/default/init * text file looking for TZ= followed by the timezone, possibly quoted @@ -513,6 +511,7 @@ zone_identifier_illumos (void) } #endif /* defined(__sun) && defined(__SRVR) */ +#ifdef G_OS_UNIX /* * returns the path to the top of the Olson zoneinfo timezone hierarchy. */