summaryrefslogtreecommitdiff
path: root/sys-power/powertop/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-26 15:48:02 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-26 15:48:02 +0000
commit38b7258d086dd5e263c3bbe3880c8c956676bc71 (patch)
tree6fce284d5bfddaf597a490ac66069d16c6a485db /sys-power/powertop/files
parent0ebf740b9c9bc7c10ac41bea315ecc6c01c79166 (diff)
gentoo resync : 25.01.2018
Diffstat (limited to 'sys-power/powertop/files')
-rw-r--r--sys-power/powertop/files/powertop-2.9-libc++.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/sys-power/powertop/files/powertop-2.9-libc++.patch b/sys-power/powertop/files/powertop-2.9-libc++.patch
new file mode 100644
index 000000000000..d378280f3c68
--- /dev/null
+++ b/sys-power/powertop/files/powertop-2.9-libc++.patch
@@ -0,0 +1,44 @@
+https://github.com/fenrus75/powertop/commit/b9c431aad6cc5383c9571007469eee8e64ec85a6
+
+From b9c431aad6cc5383c9571007469eee8e64ec85a6 Mon Sep 17 00:00:00 2001
+From: Manoj Gupta <manojgupta@chromium.org>
+Date: Sat, 4 Nov 2017 13:44:04 -0700
+Subject: [PATCH] Fix powertop build with libc++.
+
+<ctime> header is not automatically included with libc++.
+Add it explicitly to make powertop build with libc++.
+
+This fixes the following errors:
+devices/gpu_rapl_device.cpp:35:14: error: use of undeclared identifier
+'time'; did you mean 'tie'?
+last_time = time(NULL);
+ ^~~~
+devices/gpu_rapl_device.cpp:45:14: error:use of undeclared identifier
+'time'; did you mean 'tie'?
+last_time = time(NULL);
+ ^~~~
+
+parameters/learn.cpp:161:10: error: use of undeclared identifier
+'time'; did you mean 'tie'?
+start = time(NULL);
+ ^~~~
+---
+ src/lib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib.h b/src/lib.h
+index b64bb0f5433f..6d85eb6e4b40 100644
+--- a/src/lib.h
++++ b/src/lib.h
+@@ -54,7 +54,7 @@ extern const char *kernel_function(uint64_t address);
+
+
+
+-
++#include <ctime>
+ #include <string>
+ using namespace std;
+
+--
+2.15.1
+