From: walter harms <wharms@bfs.de>
To: linux-ppp@vger.kernel.org
Subject: fix compiler warning in 2.4.5
Date: Thu, 11 Mar 2010 17:08:19 +0000 [thread overview]
Message-ID: <4B992383.1060101@bfs.de> (raw)
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;
reply other threads:[~2010-03-11 17:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B992383.1060101@bfs.de \
--to=wharms@bfs.de \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.