]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/magic.c
Merge in 1.3 and post 1.3 fixes; some of them might be applicable to
[ppp.git] / pppd / magic.c
index 4797f0b19fd636f09c357b786b3378c002519ebd..db48ee8c3f4081875b0aa291f042e4a73a787dd4 100644 (file)
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: magic.c,v 1.5 1995/06/06 01:52:25 paulus Exp $";
+static char rcsid[] = "$Id: magic.c,v 1.7 1998/03/25 03:07:49 paulus Exp $";
 #endif
 
 #include <stdio.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/time.h>
 
 #include "pppd.h"
 #include "magic.h"
 
-static u_int32_t next;         /* Next value to return */
-
-extern int gethostid __P((void));
 extern long mrand48 __P((void));
 extern void srand48 __P((long));
 
-
 /*
  * magic_init - Initialize the magic number generator.
  *
@@ -49,7 +46,7 @@ magic_init()
     struct timeval t;
 
     gettimeofday(&t, NULL);
-    seed = gethostid() ^ t.tv_sec ^ t.tv_usec ^ getpid();
+    seed = get_host_seed() ^ t.tv_sec ^ t.tv_usec ^ getpid();
     srand48(seed);
 }