From: Martin Mares Date: Fri, 31 Dec 2010 15:00:34 +0000 (+0100) Subject: Use instead of X-Git-Tag: v1.13~28 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4221e03a90a97f8abe96d66a3d86841497049cf8;p=nwho.git Use instead of --- diff --git a/net.h b/net.h index 7b65eca..02d1c37 100644 --- a/net.h +++ b/net.h @@ -7,6 +7,10 @@ * of the GNU General Public License. See file COPYING in any of the GNU packages. */ +#include + +typedef uint32_t u32; + #define MAX_USERS 128 struct userinfo { @@ -14,17 +18,17 @@ struct userinfo { char con[8]; char mesg_y; char pad; - __u32 login_time; - __u32 idle_time; + u32 login_time; + u32 idle_time; }; struct rywho_pkt { - __u32 magic; /* Guard against ancient nwho versions */ - __u32 local_time; - __u32 server_time; /* Reserved for use by the server */ - __u32 num_users; - __u32 uptime; - __u32 avl[3]; + u32 magic; /* Guard against ancient nwho versions */ + u32 local_time; + u32 server_time; /* Reserved for use by the server */ + u32 num_users; + u32 uptime; + u32 avl[3]; struct userinfo users[MAX_USERS]; }; diff --git a/nwho.c b/nwho.c index d7e1f19..d5630c6 100644 --- a/nwho.c +++ b/nwho.c @@ -1,7 +1,7 @@ /* * The Remote User Information Lister * - * (c) 1997--2002 Martin Mares + * (c) 1997--2010 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU General Public License. See file COPYING in any of the GNU packages. @@ -15,7 +15,6 @@ #include #include #include -#include #include "net.h" diff --git a/nwhod.c b/nwhod.c index 6f28832..710a008 100644 --- a/nwhod.c +++ b/nwhod.c @@ -32,7 +32,7 @@ struct hostrec { struct hostrec *next; char name[32]; time_t last_rec; /* 0=down */ - __u32 addr; + u32 addr; }; static int sock, port; @@ -194,7 +194,7 @@ save_pkt(char *name, struct rywho_pkt *pkt, int len) } static inline int /* Validation checks not implemented yet */ -is_valid(__u32 ipa) +is_valid(u32 ipa) { return 1; }