* fix compiler warning in 2.4.5
@ 2010-03-11 17:08 walter harms
0 siblings, 0 replies; only message in thread
From: walter harms @ 2010-03-11 17:08 UTC (permalink / raw)
To: linux-ppp
cc -O2 -pipe -Wall -g -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include '-DDESTDIR="/usr/local"' -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE
_CRYPT_H=1 -DUSE_CRYPT=1 -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DMAXOCTETS -c -o sys-linux.o sys-linux.c
sys-linux.c: In function ‘logwtmp’:
sys-linux.c:2185: warning: passing argument 1 of ‘time’ from incompatible pointer type
on 64bit time_t is 64bit
re,
wh
--- sys-linux.c.org 2010-03-11 17:58:44.000000000 +0100
+++ sys-linux.c 2010-03-11 18:04:37.000000000 +0100
@@ -2160,7 +2160,7 @@
#if __GLIBC__ < 2
int wtmp;
#endif
-
+ time_t zeit;
/*
* Update the signon database for users.
* Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996
@@ -2182,7 +2182,21 @@
strncpy(ut.ut_user, name, sizeof(ut.ut_user));
strncpy(ut.ut_line, line, sizeof(ut.ut_line));
- time(&ut.ut_time);
+/*
+ ut_time is not what is seems to be:
+ # define ut_time ut_tv.tv_sec
+
+ struct
+ {
+ int32_t tv_sec; // Seconds.
+ int32_t tv_usec; // Microseconds.
+ } ut_tv; // Time entry was made.
+
+ this will silence the compiler until 2036 when then earth stops
+*/
+
+ time(&zeit);
+ ut.ut_time=(int32_t)zeit;
ut.ut_type = USER_PROCESS;
ut.ut_pid = mypid;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-11 17:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 17:08 fix compiler warning in 2.4.5 walter harms
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).