let recvfd fd =
  match recvmsg_fd fd with
  | (Some recvfd, _) -> recvfd
  | _ -> raise (Unix.Unix_error (Unix.EINVAL"recvfd""no descriptor"))