diff --git a/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp b/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp --- a/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp +++ b/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp @@ -41,7 +41,7 @@ /// Array of Dynamic libraries loaded for this target. struct DynLibTy { - char *FileName; + std::string FileName; void *Handle; }; @@ -100,7 +100,7 @@ for (auto &lib : DynLibs) { if (lib.Handle) { dlclose(lib.Handle); - remove(lib.FileName); + remove(lib.FileName.c_str()); } } }