summary refs log tree commit diff
path: root/src/systemd/sd-adapt/nm-sd-adapt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemd/sd-adapt/nm-sd-adapt.h')
-rw-r--r--src/systemd/sd-adapt/nm-sd-adapt.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/systemd/sd-adapt/nm-sd-adapt.h b/src/systemd/sd-adapt/nm-sd-adapt.h
index e163eeda..380cbc60 100644
--- a/src/systemd/sd-adapt/nm-sd-adapt.h
+++ b/src/systemd/sd-adapt/nm-sd-adapt.h
@@ -26,6 +26,10 @@
 #include <sys/resource.h>
 #include <time.h>
 
+#ifndef CLOCK_BOOTTIME
+#define CLOCK_BOOTTIME 7
+#endif
+
 #if defined(HAVE_DECL_REALLOCARRAY) && HAVE_DECL_REALLOCARRAY == 1
 #define HAVE_REALLOCARRAY 1
 #else
@@ -176,6 +180,15 @@ sd_notify (int unset_environment, const char *state)
 #define MAX_HANDLE_SZ 128
 #endif
 
+/*
+ * Some toolchains (E.G. uClibc 0.9.33 and earlier) don't export
+ * CLOCK_BOOTTIME even though the kernel supports it, so provide a
+ * local definition
+ */
+#ifndef CLOCK_BOOTTIME
+#define CLOCK_BOOTTIME 7
+#endif
+
 #include "sd-id128.h"
 #include "sparse-endian.h"
 #include "async.h"