The get_host_seed() function in pppd is unused and can be removed.
Index: pppd.h
===================================================================
RCS file: /cvs/src/usr.sbin/pppd/pppd.h,v
retrieving revision 1.19
diff -u -p -u -r1.19 pppd.h
--- pppd.h 12 Jun 2015 14:18:25 -0000 1.19
+++ pppd.h 3 Sep 2015 20:28:34 -0000
@@ -309,7 +309,6 @@ void unlock(void); /* Delete previously
int daemon(int, int); /* Detach us from terminal session */
void logwtmp(const char *, const char *, const char *);
/* Write entry to wtmp file */
-int get_host_seed(void); /* Get host-dependent random number seed */
#ifdef PPP_FILTER
int set_filters(struct bpf_program *pass, struct bpf_program *active);
/* Set filter programs in kernel */
Index: sys-bsd.c
===================================================================
RCS file: /cvs/src/usr.sbin/pppd/sys-bsd.c,v
retrieving revision 1.26
diff -u -p -u -r1.26 sys-bsd.c
--- sys-bsd.c 27 Oct 2009 23:59:53 -0000 1.26
+++ sys-bsd.c 3 Sep 2015 20:28:35 -0000
@@ -1440,15 +1440,6 @@ GetMask(addr)
}
/*
- * Use the hostid as part of the random number seed.
- */
-int
-get_host_seed()
-{
- return gethostid();
-}
-
-/*
* lock - create a lock file for the named lock device
*/
#define LOCK_PREFIX "/var/spool/lock/LCK.."
With this diff there is no user of gethostid() left in base. Has the
time come for [gs]ethostid to be removed from libc? The manual page
suggests they have been dropped in 4.4BSD - those functions have
survived way past their expiry date already.
cheers,
natano