aboutsummaryrefslogtreecommitdiffstats
path: root/community/sigar/0001-fix-compilation-with-musl-libc.patch
blob: 1adc9249c05fce53bd98fea86a00e0d1b20b1621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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