xstrdup now takes a const pointer as an argument.