From ff0718174faf1167fb4765ebe4bd280bbe8d2ac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 8 Dec 2019 23:42:00 +0100
Subject: [PATCH] musl: Hack to fix configure

---
 meson.build | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 075776f..dfd7421 100644
--- a/meson.build
+++ b/meson.build
@@ -101,9 +101,14 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
 
   config_h.set('PATH_WTMP', '_PATH_WTMPX')
 else
-  path_wtmp = '/var/log/utx.log'
-  assert(run_command('test', '-e', path_wtmp).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
-  config_h.set_quoted('PATH_WTMP', path_wtmp)
+  # musl: This is just a build fix hack.
+  # As usual they know better, consider all other projects crap and offer zero
+  # alternatives: So wtmp is a dead stub only [1] (= /dev/null/wtmp - taken
+  # from musl sources).
+  # Maybe a hero comes along and adds utmps [2] to make accountsservice useful for musl
+  # [1] https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?
+  # [2] https://github.com/skarnet/utmps
+  config_h.set_quoted('PATH_WTMP', '/dev/null/wtmp')
 endif
 
 # compiler flags
-- 
2.34.1

