diff --git a/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp b/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp index 57b8c86ed2225..f2af6372aa49e 100644 --- a/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp +++ b/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp @@ -75,7 +75,7 @@ class TestController : public CgroupController { char* _path; public: TestController(char* p): _path(p) {} - char* subsystem_path() override { + const char* subsystem_path() override { return _path; }; bool is_read_only() override {