Use the reentrant getmntent_r instead of getmntent