]> git.meshlink.io Git - meshlink/blobdiff - examples/manynodes.c
Never automatically try to bind to ports >= 32768.
[meshlink] / examples / manynodes.c
index 923b5542e0612bd214901f9e0095bf4631954137..64ccd9c1c855c643fbe08f8c58e556a9098754d4 100644 (file)
@@ -123,12 +123,12 @@ static void exportmeshgraph_timer(int signum) {
        gettimeofday(&ts, NULL);
 
        char name[1024];
-       snprintf(name, sizeof(name), "%sgraph_%ld_%03ld.json", namesprefix, ts.tv_sec, ts.tv_usec / 1000);
+       snprintf(name, sizeof(name), "%sgraph_%ld_%03ld.json", namesprefix, ts.tv_sec, ts.tv_usec / 1000L);
 
        exportmeshgraph(name);
 }
 
-#ifndef _WIN32
+#ifdef ITIMER_REAL
 static bool exportmeshgraph_started = false;
 
 static bool exportmeshgraph_end(void) {