chiark / gitweb /
Prep v231: Apply missing fixes from upstream (3/6) src/libelogind
[elogind.git] / src / login / test-login-shared.c
index 2df60292bf2998aa035f7cc923f4b65ab47f4c2c..76220d25d47bea2b1e59d38b996ac57b7005f152 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 /***
   This file is part of systemd.
 
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "login-util.h"
 #include "macro.h"
-#include "login-shared.h"
+
+/// Additional includes needed by elogind
+#include "musl_missing.h"
 
 static void test_session_id_valid(void) {
         assert_se(session_id_valid("c1"));
@@ -32,6 +33,10 @@ static void test_session_id_valid(void) {
 }
 
 int main(int argc, char* argv[]) {
+        elogind_set_program_name(argv[0]);
+        log_parse_environment();
+        log_open();
+
         test_session_id_valid();
 
         return 0;