mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-30 01:12:58 +02:00
accountsservice: fix musl
This commit is contained in:
parent
5e6e9a86e6
commit
06d38cc5f0
3 changed files with 43 additions and 6 deletions
0
srcpkgs/accountsservice/patches/fix-wtmpx_default.patch
Normal file
0
srcpkgs/accountsservice/patches/fix-wtmpx_default.patch
Normal file
34
srcpkgs/accountsservice/patches/musl-fgetspent_r.patch
Normal file
34
srcpkgs/accountsservice/patches/musl-fgetspent_r.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
Musl libc does not support fgetspent_r(), so fall back
|
||||||
|
to using the non-thread-safe fgetspent() function.
|
||||||
|
|
||||||
|
--- src/daemon.c 2016-09-06 21:48:50.000000000 +0200
|
||||||
|
+++ src/daemon.c 2016-11-25 10:41:01.614534302 +0100
|
||||||
|
@@ -174,7 +174,7 @@
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
shadow_entry_buffers = g_malloc0 (sizeof (*shadow_entry_buffers));
|
||||||
|
-
|
||||||
|
+#if defined(__GLIBC__)
|
||||||
|
ret = fgetspent_r (fp, &shadow_entry_buffers->spbuf, shadow_entry_buffers->buf, sizeof (shadow_entry_buffers->buf), &shadow_entry);
|
||||||
|
if (ret == 0) {
|
||||||
|
g_hash_table_insert (shadow_users, g_strdup (shadow_entry->sp_namp), shadow_entry_buffers);
|
||||||
|
@@ -185,6 +185,19 @@
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#else
|
||||||
|
+ /* Musl libc does not support fgetspent_r(), so fall back
|
||||||
|
+ * to using the non-thread-safe fgetspent() function.
|
||||||
|
+ */
|
||||||
|
+ shadow_entry = fgetspent(fp);
|
||||||
|
+ if (shadow_entry == NULL) {
|
||||||
|
+ g_free (shadow_entry_buffers);
|
||||||
|
+
|
||||||
|
+ if (errno != EINTR) {
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
} while (shadow_entry != NULL);
|
||||||
|
|
||||||
|
fclose (fp);
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'accountsservice'
|
# Template file for 'accountsservice'
|
||||||
pkgname=accountsservice
|
pkgname=accountsservice
|
||||||
version=0.6.43
|
version=0.6.43
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--disable-static --disable-systemd $(vopt_enable gir introspection)
|
configure_args="--disable-static --disable-systemd $(vopt_enable gir introspection)
|
||||||
ac_cv_file__etc_redhat_release=no ac_cv_file__etc_debian_version=no"
|
ac_cv_file__etc_redhat_release=no ac_cv_file__etc_debian_version=no"
|
||||||
|
@ -16,10 +16,6 @@ homepage="http://cgit.freedesktop.org/accountsservice/"
|
||||||
license="GPL-3"
|
license="GPL-3"
|
||||||
distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.xz"
|
distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.xz"
|
||||||
checksum=ed3ba94aa38ceb822a0e1a1ac71bf1a8123babf90be049397b3a00900e48d6cc
|
checksum=ed3ba94aa38ceb822a0e1a1ac71bf1a8123babf90be049397b3a00900e48d6cc
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
*-musl)
|
|
||||||
broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/15409/steps/shell_3/logs/stdio";;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Package build options
|
# Package build options
|
||||||
build_options="gir"
|
build_options="gir"
|
||||||
|
@ -30,7 +26,14 @@ fi
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
*-musl) configure_args+=" ac_cv_header_utmpx_h=no";;
|
*-musl)
|
||||||
|
# Patch to check for /var/log/wtmp instead of /var/log/utx.log
|
||||||
|
sed -i configure -e "s;utx\.log;wtmp;g"
|
||||||
|
configure_args+=" ac_cv_file__var_log_utx_log=yes"
|
||||||
|
# FIXME: if ac_cv_header_utmpx_h=no is set, the function
|
||||||
|
# wtmp_helper_update_login_frequencies() is not defined.
|
||||||
|
# configure_args+=" ac_cv_header_utmpx_h=no"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue