rem: unsigned int cli_sa_len = sizeof(cli_sa);
add: socklen_t cli_sa_len = sizeof(cli_sa);
context: void simple_tcp_forward(int sd, struct ip_addr *remote_ip, int remote_port){  int dest_fd[MAX_FD];  fd_set fds, tmp_fds;  int fd_set_len = sizeof(fd_set);  FD_ZERO(&fds);  int maxfd = 0;  fdset(sd, &fds, &maxfd);  int nd;  for (;;) { /* forever */    /*     * Restores tmp_fds from fds.     */    memcpy(&tmp_fds, &fds, fd_set_len);    /*     * Wait for event: connection on sd or data on anyone else.     */    DEBUGFD(syslog(LOG_DEBUG, "simple_forward: TCP select(): %d FDs", maxfd));    nd = select(maxfd, &tmp_fds, 0, 0, 0);    if (nd == -1) {      syslog(LOG_ERR, "simple_forward: TCP select() failed: %m");      continue;    }    /*     * Let's handle sd here (mother socket).     */    if (FD_ISSET(sd, &tmp_fds)) {      --nd;      /*       * Clear sd so it's ignored below in the       * loop for the client sockets.       */      FD_CLR(sd, &tmp_fds);       struct sockaddr_in cli_sa;      unsigned int cli_sa_len = sizeof(cli_sa);      int csd = accept(sd, (struct sockaddr *) &cli_sa, &cli_sa_len);      if (csd < 0)	syslog(LOG_ERR, "simple_forward: Can't accept TCP socket: %m");      else {	int cli_port = ntohs(cli_sa.sin_port);	ONVERBOSE(syslog(LOG_DEBUG, "simple_forward: TCP connection from %s:%d", inet_ntoa(cli_sa.sin_addr), cli_port));	/*	 * Connect to destination.	 */	  	int rsd = tcp_connect(remote_ip, remote_port);	if (rsd != -1) {	  if ((csd >= MAX_FD) || (rsd >= MAX_FD)) {	    syslog(LOG_ERR, "simple_forward: Destination socket descriptors overflow");	    socket_close(csd);	    socket_close(rsd);	  }	  else {	    /*	     * Add pair of communicating sockets.	     */	    fdset(csd, &fds, &maxfd);	    fdset(rsd, &fds, &maxfd);	  	    /*	     * Save peers so they can be remembered later.	     */	    dest_fd[csd] = rsd;	    dest_fd[rsd] = csd;	  }	}      }    } /* sd (mother socket) handled */    /*     * Now all other sockets.     */    for (int src_fd = 0; nd; ++src_fd)      if (FD_ISSET(src_fd, &tmp_fds)) {	--nd;	int trg_fd = dest_fd[src_fd];	/*	 * Copy data.	 */	int fail = simple_buf_copy(src_fd, trg_fd);	if (fail) {	  /*	   * Remove pair of communicating sockets.	   */	  DEBUGFD(syslog(LOG_DEBUG, "simple_forward: closed socket (FD %d or %d)", src_fd, trg_fd));	  fdclear(src_fd, &fds, &maxfd);	  fdclear(trg_fd, &fds, &maxfd);	  socket_close(src_fd);	  socket_close(trg_fd);	}      }  } /* main loop */}