From 5414201b491c8030265cf76e6d02b2e4feed4de7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Wed, 14 Sep 2005 14:51:19 +0200
Subject: [PATCH] Now uses fd_select() in preference to select(). Fixes error
 reporting on WIN32.

Rev: src/modules/files/udp.c:1.72
---
 src/modules/files/udp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/modules/files/udp.c b/src/modules/files/udp.c
index b2d5801853..655be3ba6e 100644
--- a/src/modules/files/udp.c
+++ b/src/modules/files/udp.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: udp.c,v 1.71 2004/11/06 21:40:42 peter Exp $
+|| $Id: udp.c,v 1.72 2005/09/14 12:51:19 grubba Exp $
 */
 
 #define NO_PIKE_SHORTHAND
@@ -197,6 +197,10 @@ static void udp_bind(INT32 args)
       Pike_sp[-args].u.string->size_shift))
     SIMPLE_BAD_ARG_ERROR("Stdio.UDP->bind", 1, "int|string (8bit)");
 
+  f_backtrace(0);
+  APPLY_MASTER("handle_error", 1);
+  pop_stack();
+
   if(FD != -1)
   {
     fd_close(FD);
@@ -496,7 +500,7 @@ void udp_wait(INT32 args)
   FD_SET(fd, &rset);
   tv.tv_sec = DO_NOT_WARN((int)timeout);
   tv.tv_usec = DO_NOT_WARN((int)((timeout - ((int)timeout)) * 1000000.0));
-  res = select(fd+1, &rset, NULL, NULL, &tv);
+  res = fd_select(fd+1, &rset, NULL, NULL, &tv);
   e = errno;
 
   THREADS_DISALLOW();
-- 
GitLab