First, some history, we have within Gentoo been pushing changes to
uClibc head for functions that are used
by the udev code of systemd, that were prior to that, only in glibc.
I assume this is the way you want to see things integrated, to not carry
uClibc specific hacks in systemd's code.

However, sometime after 204, unconditional use of locale_t was applied
to src/shared/util.h, and that same header
is used also in udev parts of the systemd build, and that is something
we can't change in uClibc to keep on supporting
NLS-less builds of it.

File src/shared/util.h is using locale_t which isn't used by the
strictly udev parts of the systemd code, I propose to move
this to a different header, so it is only used where it's actually required.

I'm attaching the patch we are currently using to workaround the
problem, not because it should be applied in systemd's code,
but only to demonstrate the part of the header that should get it's own
header, only to demonstrate the problem we
are having.

This is the *only* patch we are carrying for udev currently, otherwise
uClibc builds work fine, so please at least consider what
I just said.

- Samuli

Fix building with uClibc, since if NLS is disabled, locale_t is missing, and if it's enabled,
we still can't be sure the glibc way of using locale_t works for uClibc

Thanks to Mike Frysinger for the patch

--- src/shared/util.h
+++ src/shared/util.h
@@ -849,6 +849,7 @@
                 _r_;                                                    \
         })
 
+#ifndef __UCLIBC__
 struct _locale_struct_ {
         locale_t saved_locale;
         locale_t new_locale;
@@ -874,6 +875,9 @@
                      }                                                  \
                      !_saved_locale_.quit; }) ;                         \
              _saved_locale_.quit = true)
+#else
+#define RUN_WITH_LOCALE(mask, loc)
+#endif
 
 bool id128_is_valid(const char *s) _pure_;
 
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to