summaryrefslogtreecommitdiff
path: root/system/musl/3001-make-real-lastlog-h.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 20:53:37 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 20:53:37 -0500
commit21fb7168e62542ec26e32061f2bf1539ceb60b95 (patch)
treee51517796fe3c74c669d70a1aa588475f9e06b6b /system/musl/3001-make-real-lastlog-h.patch
parent3a97e7294ebdb3dd3f94f4f097f806da8071535c (diff)
downloadpackages-21fb7168e62542ec26e32061f2bf1539ceb60b95.tar.gz
packages-21fb7168e62542ec26e32061f2bf1539ceb60b95.tar.bz2
packages-21fb7168e62542ec26e32061f2bf1539ceb60b95.tar.xz
packages-21fb7168e62542ec26e32061f2bf1539ceb60b95.zip
system/musl: fix lastlog.h with utmps
Diffstat (limited to 'system/musl/3001-make-real-lastlog-h.patch')
-rw-r--r--system/musl/3001-make-real-lastlog-h.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/system/musl/3001-make-real-lastlog-h.patch b/system/musl/3001-make-real-lastlog-h.patch
new file mode 100644
index 000000000..168ef882b
--- /dev/null
+++ b/system/musl/3001-make-real-lastlog-h.patch
@@ -0,0 +1,30 @@
+Since we remove <utmp{,x}.h> from musl for utmps support, we can't use the
+included <lastlog.h>.
+
+This implements just the lastlog stuff from musl <utmp.h>.
+
+--- musl-1.1.19/include/lastlog.h 2018-02-22 12:39:19.000000000 -0600
++++ musl-1.1.19/include/lastlog.h 2018-06-15 20:04:54.428854473 -0500
+@@ -1 +1,21 @@
+-#include <utmp.h>
++#ifndef _LASTLOG_H
++#define _LASTLOG_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#define UT_HOSTSIZE 256
++#define UT_LINESIZE 32
++
++struct lastlog {
++ time_t ll_time;
++ char ll_line[UT_LINESIZE];
++ char ll_host[UT_HOSTSIZE];
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif