summaryrefslogtreecommitdiff
path: root/lib/gethrxtime.h
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@lrde.epita.fr>2012-10-08 14:46:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-10-08 14:46:47 -0700
commit0b95481ce5bd62e3150f0e94a1e3ce3a38fc5b0a (patch)
tree9f054321f4dd28a9d02f4f45326a4ff9dc038c44 /lib/gethrxtime.h
parent97204f3c7a78cf0c63873cb786f055fb26a72205 (diff)
downloadgnulib-0b95481ce5bd62e3150f0e94a1e3ce3a38fc5b0a.tar.gz
gethrxtime: port to C++
* lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C".
Diffstat (limited to 'lib/gethrxtime.h')
-rw-r--r--lib/gethrxtime.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gethrxtime.h b/lib/gethrxtime.h
index f09ef39c38..9453d609e3 100644
--- a/lib/gethrxtime.h
+++ b/lib/gethrxtime.h
@@ -22,6 +22,10 @@
# include "xtime.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Get the current time, as a count of the number of nanoseconds since
an arbitrary epoch (e.g., the system boot time). Prefer a
high-resolution clock that is not subject to resetting or
@@ -34,4 +38,8 @@ static inline xtime_t gethrxtime (void) { return gethrtime (); }
xtime_t gethrxtime (void);
# endif
+#ifdef __cplusplus
+}
+#endif
+
#endif