Don't use HZ -- use sysconf(_SC_CLK_TCK)
authorEric Andersen <andersen@codepoet.org>
Wed, 12 Feb 2003 10:56:53 +0000 (10:56 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 12 Feb 2003 10:56:53 +0000 (10:56 -0000)
networking/libiproute/utils.c

index 63084e15e8bd316910979107229fb2d8c0712f17..2c23cd294d2f523b9f977fbcc689960a0467cc52 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <arpa/inet.h>
 
 #include "utils.h"
@@ -316,7 +317,7 @@ int __get_hz(void)
        }
        if (hz)
                return hz;
-       return HZ;
+       return sysconf(_SC_CLK_TCK);
 }
 
 const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen)