Also do not use drand48(), it is not available on Windows.
[tinc] / src / net.c
index 910e86d..c893f1e 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -251,7 +251,7 @@ static void check_dead_connections(void)
                        } else {
                                if(c->status.remove) {
                                        logger(LOG_WARNING, _("Old connection_t for %s (%s) status %04x still lingering, deleting..."),
-                                                  c->name, c->hostname, *(uint32_t *)&c->status);
+                                                  c->name, c->hostname, bitfield_to_int(&c->status, sizeof c->status));
                                        connection_del(c);
                                        continue;
                                }
@@ -366,7 +366,6 @@ int main_loop(void)
        last_graph_dump = now;
        
        srand(now);
-       srand48(now);
 
        running = true;