File: fix-linux-build.patch

package info (click to toggle)
calife 1%3A3.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 668 kB
  • sloc: sh: 3,024; ansic: 1,273; makefile: 69
file content (39 lines) | stat: -rw-r--r-- 922 bytes parent folder | download
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
Author: Ahmad Khalifa <ahmad@khalifa.ws>
Last-Update: 2025-08-28
Description: Fix compilation on Linux

diff --git a/calife.c b/calife.c
index 727324d..2ba999c 100644
--- a/calife.c
+++ b/calife.c
@@ -372,7 +372,7 @@ main (int argc, char * argv [])
     }
 
     uid = getuid();
-    name = whoami();
+    name = whoami(tty);
 
     /*
      * open syslod log file
@@ -787,7 +787,7 @@ exec_shell (char * shell_name)
  **/
 
 char *
-whoami (void)
+whoami (char * tty)
 {
     char   * login, * name;
     struct passwd *pwd;
diff --git a/conf.h b/conf.h
index c605fe6..8dfc6e5 100644
--- a/conf.h
+++ b/conf.h
@@ -188,7 +188,7 @@ typedef struct cred_t cred_t;
 # endif /* HAVE_BASENAME */
   void * xalloc (size_t size);
   _Noreturn void die (int err, const char * fmt,...) _NORETURN;
-  char * whoami(void);
+  char * whoami(char * tty);
 #ifdef WITH_PAM
   int  auth_pam(struct passwd **ppw, const char *pass);
 #endif