This repository has been archived by the owner on May 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-on-alpine.patch
50 lines (46 loc) · 1.63 KB
/
build-on-alpine.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 56d6b281f8ac3a5dc66c9e6356603a43dd88382b Mon Sep 17 00:00:00 2001
From: Gerco <[email protected]>
Date: Tue, 29 Sep 2015 23:30:42 +0000
Subject: [PATCH] Fix build errors on Alpine Linux
---
shellinabox/launcher.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c
index 2bac171..612a6c6 100644
--- a/shellinabox/launcher.c
+++ b/shellinabox/launcher.c
@@ -66,6 +66,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/utsname.h>
+#include <sys/ttydefaults.h>
#include <termios.h>
#include <unistd.h>
@@ -1572,19 +1573,19 @@ static void childProcess(struct Service *service, int width, int height,
#ifdef HAVE_UTMPX_H
if (enableUtmpLogging) {
setutxent();
- struct utmpx utmpx = utmp->utmpx;
+ struct utmpx utmpxx = utmp->utmpx;
if (service->useLogin || service->authUser) {
- utmpx.ut_type = LOGIN_PROCESS;
- memset(utmpx.ut_host, 0, sizeof(utmpx.ut_host));
+ utmpxx.ut_type = LOGIN_PROCESS;
+ memset(utmpxx.ut_host, 0, sizeof(utmpxx.ut_host));
}
- pututxline(&utmpx);
+ pututxline(&utmpxx);
endutxent();
#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
if (!utmp->useLogin) {
- memset(&utmpx.ut_user, 0, sizeof(utmpx.ut_user));
- strncat(&utmpx.ut_user[0], "LOGIN", sizeof(utmpx.ut_user) - 1);
- updwtmpx("/var/log/wtmp", &utmpx);
+ memset(&utmpxx.ut_user, 0, sizeof(utmpxx.ut_user));
+ strncat(&utmpxx.ut_user[0], "LOGIN", sizeof(utmpxx.ut_user) - 1);
+ updwtmpx("/var/log/wtmp", &utmpxx);
}
#endif
}
--
2.4.1