blob: 6dd77ef8edefeebd09bc72d4a202474b6b18dc83 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 8cdf846922ffb3e0d2a828be473fdf9c45a56e7c Mon Sep 17 00:00:00 2001
2From: Rosen Penev <rosenp@gmail.com>
3Date: Sat, 30 Mar 2019 20:19:17 -0700
4Subject: [PATCH] intel_cpus.cpp: Change open parameter to const char *
5
6ifstream::open takes std::string starting with C++11, not before.
7
8This fixes compilation with uClibc++ and potentially other older libraries
9
10Signed-off-by: Rosen Penev <rosenp@gmail.com>
11---
12 src/cpu/intel_cpus.cpp | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15--- a/src/cpu/intel_cpus.cpp
16+++ b/src/cpu/intel_cpus.cpp
17@@ -92,7 +92,7 @@ int is_supported_intel_cpu(int model, in
18
19 int is_intel_pstate_driver_loaded()
20 {
21- const string filename("/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver");
22+ const char *filename = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver";
23 const string intel_pstate("intel_pstate");
24 char line[32] = { '\0' };
25 ifstream file;