Don't change the general case. Instead, add a macro in nsswitch.h called nss_interface_function. Conditionalize the definition there on DO_STATIC_NSS. Use that in place of static_link_warning for the NSS interfaces.