chiark / gitweb /
cprogs: Move nonblock() to common.[co]
[chiark-utils.git] / cprogs / mcastsoundd.c
index 8a8c67010de2c7bffb37f24e5a025e094d30210a..ead525fba84009fe1e99adee7dd9ec9c3ea8d121 100644 (file)
 
 #include <endian.h>
 #include <sys/types.h>
-#include <fcntl.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
 #include "myopt.h"
+#include "common.h"
 
 typedef unsigned char Byte;
 
@@ -152,13 +152,6 @@ MARS
 
 /*---------- general stuff ----------*/
 
-static void nonblock(int fd) {
-  int r;
-  r= fcntl(fd,F_GETFL);  if (r<0) sysfail("nonblock fcntl F_GETFL");
-  r |= O_NONBLOCK;
-  r= fcntl(fd,F_SETFL,r);  if (r<0) sysfail("nonblock fcntl F_GETFL");
-}
-
 static void blocksignals(int how) {
   sigset_t set;
   int r;