Add ifdefs for linux-only functions. #1080