From 59751d6ac2df525d0b8aed73203848a282b0edab Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sun, 13 Mar 2016 08:23:32 -0400 Subject: [PATCH] geocode-glib.c: use __UCLIBC__ to check for uClibc only features Commit f0f85d8d from the geocode-glib codebase uses __GLIBC__ to check for glibc only features. However this is not sufficient for uClibc because it shares code with glibc. To properly select for uClibc only features, one needs defined(__GLIBC__) && !defined(__UCLIBC__). We note parenthatically that this is not required for musl which avoids all such ugly marcos. --- src/geocode-glib/geocode-glib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geocode-glib/geocode-glib.c b/src/geocode-glib/geocode-glib.c index 0ac4eb5..4294f11 100644 --- a/src/geocode-glib/geocode-glib.c +++ b/src/geocode-glib/geocode-glib.c @@ -190,7 +190,7 @@ _geocode_object_get_lang (void) return geocode_object_get_lang_for_locale (setlocale (LC_MESSAGES, NULL)); } -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) static gpointer is_number_after_street (gpointer data) { @@ -223,7 +223,7 @@ is_number_after_street (gpointer data) gboolean _geocode_object_is_number_after_street (void) { -#ifndef __GLIBC__ +#if !defined(__GLIBC__) || defined(__UCLIBC__) return FALSE; #else static GOnce once = G_ONCE_INIT; -- 2.4.10