powertop/powertop_libc++_fix.patch
Thomas Renninger baf3fdf131 Accepting request 547222 from home:trenn:branches:Base:System
- Upgrade to version 2.9
Already mainline:
D powertop-2.8-potential-segfaults.patch
D powertop-no-date.patch
From mainline (after 2.9):
A powertop_cstate_fix.patch
A powertop_libc++_fix.patch

OBS-URL: https://build.opensuse.org/request/show/547222
OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=52
2017-12-01 16:47:17 +00:00

38 lines
1.0 KiB
Diff

commit b9c431aad6cc5383c9571007469eee8e64ec85a6
Author: Manoj Gupta <manojgupta@chromium.org>
Date: Sat Nov 4 13:44:04 2017 -0700
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);
^~~~
diff --git a/src/lib.h b/src/lib.h
index b64bb0f..6d85eb6 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;