Commit Diff


commit - fe40638928b636182afb03b6327afa15c80d560c
commit + 346f28eeaa205d268d1e63c7ffd86cf041f6d1e6
blob - 5c107e28544ad469afabc31c905eef330f54eff3
blob + 5ccf59b45825328ff3a10f73f5251aef31d6ea72
--- gmid.h
+++ gmid.h
@@ -220,7 +220,6 @@ const char	*vhost_lang(struct vhost*, const char*);
 const char	*vhost_default_mime(struct vhost*, const char*);
 const char	*vhost_index(struct vhost*, const char*);
 int		 vhost_auto_index(struct vhost*, const char*);
-void		 mark_nonblock(int);
 void		 loop(struct tls*, int, int);
 
 /* ex.c */
@@ -254,6 +253,7 @@ int		 puny_decode(const char*, char*, size_t, const ch
 int		 starts_with(const char*, const char*);
 int		 ends_with(const char*, const char*);
 ssize_t		 filesize(int);
+void		 mark_nonblock(int);
 char		*absolutify_path(const char*);
 
 #endif
blob - 07fb904bc4bcb08f50ab7500cdacf488263b3e7e
blob + 0a8d794f4907f5b8b7f50a76ee046a4b0932aa79
--- server.c
+++ server.c
@@ -268,17 +268,6 @@ err:
 	return;
 }
 
-void
-mark_nonblock(int fd)
-{
-	int flags;
-
-	if ((flags = fcntl(fd, F_GETFL)) == -1)
-		fatal("fcntl(F_GETFL): %s", strerror(errno));
-	if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1)
-		fatal("fcntl(F_SETFL): %s", strerror(errno));
-}
-
 static void
 handle_handshake(struct pollfd *fds, struct client *c)
 {
blob - c32ecb8af4fe2267ab399151dff9bedf9ef4c50c
blob + c64a181ece812e1786646b5ecd0e62d5573f45fe
--- utils.c
+++ utils.c
@@ -15,6 +15,7 @@
  */
 
 #include <errno.h>
+#include <fcntl.h>
 #include <string.h>
 
 #include "gmid.h"
@@ -63,6 +64,17 @@ filesize(int fd)
 	return len;
 }
 
+void
+mark_nonblock(int fd)
+{
+	int flags;
+
+	if ((flags = fcntl(fd, F_GETFL)) == -1)
+		fatal("fcntl(F_GETFL): %s", strerror(errno));
+	if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1)
+		fatal("fcntl(F_SETFL): %s", strerror(errno));
+}
+
 char *
 absolutify_path(const char *path)
 {