Skip to contentSkip to conversation

libdm: do not in include internal bits/time.h header

PATCH New Natanael Copa 2 participants 2 messages Aug 13, 2015 – Aug 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libdm: do not in include internal bits/time.h header

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(-)
libdm/libdm-timestamp.c +0 -1
index 3e01442..9be93a4 100644
@@ -34,7 +34,6 @@
 #ifdef HAVE_REALTIME
 
 #include <time.h>
-#include <bits/time.h>
 
 struct dm_timestamp {
 	struct timespec t;
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 libdm: do not in include internal bits/time.h header

Quoted 7 lines · Natanael Copa

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

Applied - thanks!

Regards,
Bryn.