Tweak x11/xvt version 3.0.0
[dports.git] / x11 / xvt / files / patch-src_logging.c
1 --- src/logging.c.orig  2014-12-09 13:47:18.000000000 -0800
2 +++ src/logging.c       2014-12-09 13:47:35.000000000 -0800
3 @@ -82,7 +82,8 @@
4      else if (sscanf(pty, "pts/%d", &i) == 1)
5         sprintf(ut_id, "vt%02x", (i & 0xff));   /* sysv naming */
6  #endif
7 -    else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) {
8 +    else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3) &&
9 +               STRNCMP(pty, "pts/", 4)) {
10         xvt_print_error("can't parse tty name \"%s\"", pty);
11         return;
12      }
13 @@ -137,7 +138,9 @@
14      STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
15             sizeof(utx->ut_user));
16      STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
17 +#if 0
18      utx->ut_session = getsid(0);
19 +#endif
20      utx->ut_tv.tv_sec = time(NULL);
21      utx->ut_tv.tv_usec = 0;
22      utx->ut_pid = r->h->cmd_pid;
23 @@ -202,7 +205,7 @@
24         xvt_update_wtmp(XVT_WTMP_FILE, ut);
25  #  endif
26  # endif
27 -# ifdef HAVE_STRUCT_UTMPX
28 +# if 0
29         updwtmpx(XVT_WTMPX_FILE, utx);
30  # endif
31      }
32 @@ -254,7 +257,9 @@
33      if ((tmputx = getutxid(utx)))      /* position to entry in utmp file */
34         utx = tmputx;
35      utx->ut_type = DEAD_PROCESS;
36 +#if 0
37      utx->ut_session = getsid(0);
38 +#endif
39      utx->ut_tv.tv_sec = time(NULL);
40      utx->ut_tv.tv_usec = 0;
41  #endif
42 @@ -274,7 +279,7 @@
43         xvt_update_wtmp(XVT_WTMP_FILE, ut);
44  #  endif
45  # endif
46 -# ifdef HAVE_STRUCT_UTMPX
47 +# if 0
48         updwtmpx(XVT_WTMPX_FILE, utx);
49  # endif
50      }