aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/time.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/time.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/time.h b/sys/compat/linuxkpi/common/include/linux/time.h
index c7a41a83f4aa..6c9a781d5e0e 100644
--- a/sys/compat/linuxkpi/common/include/linux/time.h
+++ b/sys/compat/linuxkpi/common/include/linux/time.h
@@ -22,12 +22,12 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#ifndef _LINUXKPI_LINUX_TIME_H_
#define _LINUXKPI_LINUX_TIME_H_
+#define MSEC_PER_SEC 1000L
+
#define NSEC_PER_USEC 1000L
#define NSEC_PER_MSEC 1000000L
#define NSEC_PER_SEC 1000000000L
@@ -40,6 +40,8 @@
#include <sys/time.h>
#include <sys/stdint.h>
+#include <linux/math64.h>
+
static inline struct timeval
ns_to_timeval(const int64_t nsec)
{
@@ -117,6 +119,8 @@ ns_to_timespec(const int64_t nsec)
return (ts);
}
+#define ns_to_timespec64(_x) ns_to_timespec(_x)
+
static inline int
timespec_valid(const struct timespec *ts)
{