Compile error

Um... You are already contradicting yourself. Just a second ago you clearly (and correctly) stated that there is a way to get around that fact: casting it to char *. What gives?

You can't get around the fact that a string literal is pointed to by a const char *. You can pretend that a const char * is a char *, when passing the pointer to a function that expects a pointer to char BUT that doesn't actually intend to modify the char array pointed to.

Trying to pretend that a const char * is a char *, when the function DOES actually modify the pointed to array is a recipe for disaster.

In this case the fact is we are doing with third-party code from a repository (read: a code that we should not really modify) that suffers from this unfortunate problem.

The fact is that OP does not NEED to use this function. OP might want to, because it is easy. But, then OP needs to be prepared to deal with the fact that the function is poorly declared.

But alas I've seen people who "used" the language for even longer periods of time, but... you know... never really cared to learn it properly.

That wouldn't be me. I don't keep the references handy, so I occasionally get a fact (or two) wrong. But I do understand pointers and arrays and casting, and what casts are valid and what casts are not. I can recognize a poorly written/not well tested function when I see it.