You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1008 B

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