diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -1,23 +0,0 @@ -#include <stdlib.h> -#include <stdbool.h> -#include <stdio.h> -#include <sys/ioctl.h> -#include <sys/types.h> - -#include "util.h" -#include "constant.h" - -void panic(const char *msg) -{ - perror(msg); - exit(EXIT_FAILURE); -} - -int setblocking(int fd, bool blocking) -{ - u_long mode = blocking ? 0 : 1; - if (ioctl(fd, FIONBIO, &mode) == -1) - return ERROR; - - return OK; -} |