util: Fix unknown time_t types with musl-libc builds

Fixes the following build errors seen with musl-libc:

In file included from print.h:25:0,
                     from linreg.c:24:
util.h:364:32: error: unknown type name 'time_t'
int rate_limited(int interval, time_t *last);

Signed-off-by: Stephen Walker <stephendwalker+github@gmail.com>
[florian: extract patch from OpenWrt, add commit message]
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
master
Stephen Walker 2017-05-07 14:44:14 -07:00 committed by Richard Cochran
parent 43b2f5d120
commit 159eb5ff11
1 changed files with 2 additions and 0 deletions

2
util.h
View File

@ -20,6 +20,8 @@
#ifndef HAVE_UTIL_H #ifndef HAVE_UTIL_H
#define HAVE_UTIL_H #define HAVE_UTIL_H
#include <time.h>
#include "ddt.h" #include "ddt.h"
#include "ether.h" #include "ether.h"