Changeset 5959:b568f7b84e08 in roaraudio for libroar/random.c
- Timestamp:
- 01/04/14 05:16:50 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/random.c
r5823 r5959 38 38 #ifdef ROAR_HAVE_LIBGCRYPT 39 39 #include <gcrypt.h> 40 #endif 41 42 #ifdef ROAR_HAVE_UNAME 43 #include <sys/utsname.h> 40 44 #endif 41 45 … … 71 75 volatile uint32_t now = time(NULL); 72 76 #endif 77 #ifdef ROAR_HAVE_UNAME 78 static struct utsname utsname; 79 #endif 73 80 74 81 roar_random_init(); … … 90 97 roar_hash_buffer(off+TIGER_DIGESTLEN, buf, TIGER_BLOCKLEN, ROAR_HT_TIGER); 91 98 99 // init is now done: 92 100 inited = 1; 101 102 // do additional seeding: 103 104 #ifdef ROAR_HAVE_UNAME 105 if ( uname(&utsname) == 0 ) { 106 roar_random_salt_nonce(&utsname, sizeof(utsname)); 107 } 108 #endif 93 109 } 94 110
Note: See TracChangeset
for help on using the changeset viewer.