pkgsrc/net/icsi-finger/patches/patch-ai
is 4f4f18901b Fix for 64bit time_t:
- make the packet contain explicit 32bit data for compatibility with
  clients on machines with 32bit time_t.
- replace ctime() calls on such changed former time_t values by a
  shim that does the translation.
This does not start to work after 2038 yet - that would need a change
of the collection protocol.
2011-01-18 12:28:25 +00:00

20 lines
609 B
Text

$NetBSD: patch-ai,v 1.1 2011/01/18 12:28:25 is Exp $
--- include/packet.h.orig 1994-01-11 02:15:10.000000000 +0000
+++ include/packet.h
@@ -44,12 +44,12 @@ typedef struct {
char name[USERNAME_LEN];
char real_name[REALNAME_LEN];
char host[HOSTNAME_LEN];
- time_t login_time;
- time_t idle_time;
+ int32_t login_time;
+ int32_t idle_time;
char ttyname[TTYNAME_LEN];
char ttyloc[TTYLOC_LEN];
char what[WHAT_LEN];
-} FINGER_PACKET;
+} __attribute__((__packed__)) FINGER_PACKET;
/* Strings used in dummy packets to signal host is free or down */
#define HOST_NOUSERS "Host has no users"