diff --git a/srcpkgs/accountsservice/patches/fix-wtmpx_default.patch b/srcpkgs/accountsservice/patches/fix-wtmpx_default.patch new file mode 100644 index 00000000000..e69de29bb2d diff --git a/srcpkgs/accountsservice/patches/musl-fgetspent_r.patch b/srcpkgs/accountsservice/patches/musl-fgetspent_r.patch new file mode 100644 index 00000000000..7940ca87104 --- /dev/null +++ b/srcpkgs/accountsservice/patches/musl-fgetspent_r.patch @@ -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); diff --git a/srcpkgs/accountsservice/template b/srcpkgs/accountsservice/template index 5140264ec8e..7ce5ddec8ae 100644 --- a/srcpkgs/accountsservice/template +++ b/srcpkgs/accountsservice/template @@ -1,7 +1,7 @@ # Template file for 'accountsservice' pkgname=accountsservice version=0.6.43 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-static --disable-systemd $(vopt_enable gir introspection) 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" distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.xz" 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 build_options="gir" @@ -30,7 +26,14 @@ fi pre_configure() { 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 }