Make lib/mountcheck.c a stand-alone library