[lvm-devel] [PATCH] libdm: do not in include internal bits/time.h header

Natanael Copa ncopa at alpinelinux.org
Thu Aug 13 07:16:28 UTC 2015


Do not include bits/time.h as it is an internal libc header file.

A comment at the top of the glibc specific bits/time.h says:
"Never include this file directly; use <time.h> instead."

This fixes the following build error with musl libc:
libdm-timestamp.c:37:23: fatal error: bits/time.h: No such file or directory
---
Compile tested with Alpine Linx (musl libc) and ubuntu 15.04

 libdm/libdm-timestamp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libdm/libdm-timestamp.c b/libdm/libdm-timestamp.c
index 3e01442..9be93a4 100644
--- a/libdm/libdm-timestamp.c
+++ b/libdm/libdm-timestamp.c
@@ -34,7 +34,6 @@
 #ifdef HAVE_REALTIME
 
 #include <time.h>
-#include <bits/time.h>
 
 struct dm_timestamp {
 	struct timespec t;
-- 
2.5.0




More information about the lvm-devel mailing list