--- freeradius-0.9.3/src/main/radiusd.c.orig	Wed Oct  8 20:55:26 2003
+++ freeradius-0.9.3/src/main/radiusd.c	Tue Jan 13 11:09:35 2004
@@ -277,6 +277,7 @@
 	int fd = 0;
 	int max_fd;
 	int status;
+	int myerrno;
 	int radius_port = 0;
 	struct servent *svp;
 	struct timeval *tv = NULL;
@@ -896,6 +897,7 @@
 #endif
 
 		status = select(max_fd + 1, &readfds, NULL, NULL, tv);
+		myerrno = errno;
 #ifndef HAVE_PTHREAD_H
 		/*
 		 *	If there are no child threads, then there may
@@ -916,12 +918,12 @@
 			 *	then the code at the start of the loop
 			 *	catches that, and exits.
 			 */
-			if (errno == EINTR) {
+			if (myerrno == EINTR) {
 				tv = rad_clean_list(time(NULL));
 				continue;
 			}
 			radlog(L_ERR, "Unexpected error in select(): %s",
-					strerror(errno));
+					strerror(myerrno));
 			exit(1);
 		}
 
