add guard for timeval related definition