libc must be recompiled after redefining MAXDNSRCH and defdname in resolv.h in the package, and then re-packaged. Do not modify /usr/include/resolv.h, but rather resolv.h in the package which delivers it.
For example, if one is on an RPM-based operating system, one would download the .srpm, install it locally, modify the source code, re-archive it and rebuild the .srpm and .rpm packages, upload the .rpm into the Yellowdog Update Manager ("YUM") repository and mass-upgrade the libc package on all affected systems. The .srpm would, after regression testing, be committed into one's local source code repository and the changes documented in the commit log as well as the build release document. Although this example used RPM, this applies to all operating systems which support packages.
Anything less than this, and one is looking at a hack instead of doing clean system engineering.