aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-08 22:11:37 +0100
committerMax Kellermann <max@duempel.org>2009-11-08 22:11:37 +0100
commit2f4144e1cdf59ab151036a6e45410dbf14435c16 (patch)
tree5f5082766f9365f9ec4701d2b658fb5384c0d8cb /src
parentf66edccffdc4a9276ae9dced69fa6fb74ee1f97e (diff)
downloadmpd-2f4144e1cdf59ab151036a6e45410dbf14435c16.tar.gz
mpd-2f4144e1cdf59ab151036a6e45410dbf14435c16.tar.xz
mpd-2f4144e1cdf59ab151036a6e45410dbf14435c16.zip
utils: removed function set_nonblocking()
It's not used anymore, its features have been moved to fd_util.c.
Diffstat (limited to '')
-rw-r--r--src/utils.c30
-rw-r--r--src/utils.h2
2 files changed, 0 insertions, 32 deletions
diff --git a/src/utils.c b/src/utils.c
index ed8ef6c1a..f8051a41d 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -102,36 +102,6 @@ char *parsePath(char *path)
#endif
}
-int set_nonblocking(int fd)
-{
-#ifdef WIN32
- u_long val = 1;
- int retval;
- int lasterr = 0;
- retval = ioctlsocket(fd, FIONBIO, &val);
- if(retval == SOCKET_ERROR)
- g_error("Error: ioctlsocket could not set FIONBIO;"
- " Error %d on socket %d", lasterr = WSAGetLastError(), fd);
- if(lasterr == 10038)
- g_debug("Code-up error! Attempt to set non-blocking I/O on "
- "something that is not a Winsock2 socket. This can't "
- "be done on Windows!\n");
- return retval;
-#else
- int ret, flags;
-
- assert(fd >= 0);
-
- while ((flags = fcntl(fd, F_GETFL)) < 0 && errno == EINTR) ;
- if (flags < 0)
- return flags;
-
- flags |= O_NONBLOCK;
- while ((ret = fcntl(fd, F_SETFL, flags)) < 0 && errno == EINTR) ;
- return ret;
-#endif
-}
-
bool
string_array_contains(const char *const* haystack, const char *needle)
{
diff --git a/src/utils.h b/src/utils.h
index a77d4a03d..9d891be4a 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -33,8 +33,6 @@
char *parsePath(char *path);
-int set_nonblocking(int fd);
-
/**
* Checks whether a string array contains the specified string.
*