aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sigar/0001-fix-compilation-with-musl-libc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/sigar/0001-fix-compilation-with-musl-libc.patch')
-rw-r--r--testing/sigar/0001-fix-compilation-with-musl-libc.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/sigar/0001-fix-compilation-with-musl-libc.patch b/testing/sigar/0001-fix-compilation-with-musl-libc.patch
new file mode 100644
index 0000000000..1adc9249c0
--- /dev/null
+++ b/testing/sigar/0001-fix-compilation-with-musl-libc.patch
@@ -0,0 +1,30 @@
+From 9f63c2048e6933cb02c7d2fa19fd069ed511750d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 14 Mar 2016 14:14:30 +0000
+Subject: [PATCH 1/3] fix compilation with musl libc
+
+the HZ define is not exposed by musl libc.
+
+(cherry picked from commit 5e09cdb086a77314dfbff5dc0a18359bac965111)
+---
+ src/os/linux/linux_sigar.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/os/linux/linux_sigar.c b/src/os/linux/linux_sigar.c
+index 0a44623..592df9f 100644
+--- a/src/os/linux/linux_sigar.c
++++ b/src/os/linux/linux_sigar.c
+@@ -45,6 +45,10 @@
+ #define PROC_PARTITIONS PROC_FS_ROOT "partitions"
+ #define PROC_DISKSTATS PROC_FS_ROOT "diskstats"
+
++#ifndef HZ
++#define HZ 100
++#endif
++
+ /*
+ * /proc/self/stat fields:
+ * 1 - pid
+--
+2.8.1
+