#include <afs/param.h>
#endif
-RCSID
- ("$Header$");
#ifdef KERNEL
#include "afs/sysincludes.h"
#else /* KERNEL */
#include <stdio.h>
#include <errno.h>
+#include <string.h>
#ifdef AFS_NT40_ENV
#include <winsock2.h>
#include <process.h>
#include <sys/time.h>
#endif /* ITIMER_REAL */
#include <net/if.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
afs_int32 got_no_time = 0, code;
if (!uuid_init_done) {
- uuid_time_t t;
- u_short *seedp, seed = 0;
+ union {
+ uuid_time_t t;
+ u_short seed[4];
+ } uuid_time;
+ u_short seed = 0;
rand_m = 971;;
rand_ia = 11113;
rand_ib = 104322;
* independent. Then for good measure to ensure a unique seed when there
* are multiple processes creating UUID's on a system, we add in the PID.
*/
- uuid__get_os_time(&t);
- seedp = (u_short *) (&t);
- seed ^= *seedp++;
- seed ^= *seedp++;
- seed ^= *seedp++;
- seed ^= *seedp++;
+ uuid__get_os_time(&uuid_time.t);
+ seed ^= uuid_time.seed[0];
+ seed ^= uuid_time.seed[1];
+ seed ^= uuid_time.seed[2];
+ seed ^= uuid_time.seed[3];
#if defined(KERNEL) && defined(AFS_XBSD_ENV)
rand_irand += seed + (afs_uint32) curproc->p_pid;
#else