struct timeval is defined in sys/time.h with a musl toolchain.
Fixes:
In file included from devices/devfreq.cpp:35:0:
devices/devfreq.h:35:18: error: field ‘stamp_before’ has incomplete type ‘timeval’
struct timeval stamp_before, stamp_after;
Signed-off-by: Romain Naour <romain.naour(a)openwide.fr>
---
src/devices/devfreq.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h
index 16a60fb..4a8983b 100644
--- a/src/devices/devfreq.h
+++ b/src/devices/devfreq.h
@@ -27,6 +27,7 @@
#include "device.h"
#include "../parameters/parameters.h"
+#include <sys/time.h>
struct frequency;
--
2.4.3
Show replies by date
snprinf is defined in stdio.h.
Fixes:
perf/perf_bundle.cpp: In function ‘void parse_event_format(const char*)’:
perf/perf_bundle.cpp:141:75: error: ‘sprintf’ was not declared in this scope
sprintf(file, "/sys/kernel/debug/tracing/events/%s/%s/format", sys, event);
Signed-off-by: Romain Naour <romain.naour(a)openwide.fr>
---
src/perf/perf_bundle.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
index cf1ae11..3d216ff 100644
--- a/src/perf/perf_bundle.cpp
+++ b/src/perf/perf_bundle.cpp
@@ -31,6 +31,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stdio.h>
#include "perf_bundle.h"
#include "perf_event.h"
--
2.4.3