See upstream bug.
Maybe a look at recent master commits is worth it https://github.com/ygrek/mldonkey/commits/master
Yes, I saw that commit that says "fix build with 4.12", but the commit message also says it still requires unsafe strings, so not really a fix for this issue. That commit only added two lines, the fix for unsafe string will require many more changes.