Well, at work, we were using C-Ares (a C-based DNS resolving library) for two different projects and both were mired in problems involving said library; race conditions, having to add support for NAPTR records (I checked about half a dozen different DNS resolving libraries and none supported decoding that record).
Even though it wasn't part of my job description, I wrote my own DNS resolving library over a weekend that better matched what our needs were. It was just as fast, easier to integrate (since it made fewer assumptions about network usage), and the runtime memory footprint of at lease one project dropped from 15M to less than 400k, due to my "reinvented" wheel. Had I not done that (back in November) we still would probably be fighting with C-Ares today in both projects.