*** dirsend.c	Wed Oct 21 00:56:53 1992
--- dirsend.c	Sun Apr  9 00:17:08 1995
***************
*** 10,15 ****
--- 10,19 ----
     done, come back and add them into this main file.  It's getting pretty
     nasty down there.  */
  
+ /*
+    This file was changed slightly by bert hubert (A.W.R.Hubert@ET.TUDelft.nl)
+    to accomodate for a quirk in older versions of Linux' libc. */
+ 
  #include <stdio.h>
  #include <errno.h>
  
***************
*** 170,175 ****
--- 174,180 ----
  static struct timeval	ackwait;	/* Time to wait before acking   */
  static struct timeval	gapwait;	/* Time to wait b4 filling gaps */
  static struct timeval	*selwait;	/* Time to wait for select      */
+ static struct timeval   workaround;     /* Workaround for Linux quirk (awr) */
  static int		retries;	/* was = client_dirsrv_retry    */
  char   to_hostname[512];		/* lmjm: saves inet_ntoa() str  */
  
***************
*** 1021,1027 ****
--- 1026,1034 ----
      /* select - either recv is ready, or timeout */
      /* see if timeout or error or wrong descriptor */
  #ifndef CUTCP
+     memcpy(&workaround,selwait,sizeof(struct timeval));
      tmp = select(lp + 1, &readfds, (SELECTARG *)0, (SELECTARG *)0, selwait);
+     memcpy(selwait,&workaround,sizeof(struct timeval));    
      if (tmp == 0) {
  	timeoutProc(NULL,&timerId);
      } else if ((tmp < 0) || !FD_ISSET(lp,&readfds)) {
