if (*optlen < buflen) *optlen = buflen;
getsockopt (fd, level, optname, optval, optlen)     int fd;     int level;     int optname;     void *optval;     size_t *optlen;{  error_t err;  char *buf = optval;  mach_msg_type_number_t buflen = *optlen;  if (err = HURD_DPORT_USE (fd, __socket_getopt (port,						 level, optname,						 &buf, &buflen)))    return __hurd_dfail (fd, err);  if (buf != optval)    {      if (*optlen < buflen)	*optlen = buflen;      memcpy (optval, buf, *optlen);      __vm_deallocate (__mach_task_self (), (vm_address_t) buf, buflen);    }  return 0;}