packages feed

network-socket-options 0.2 → 0.2.0.1

raw patch · 2 files changed

+5/−4 lines, 2 files

Files

cbits/sockopt.c view
@@ -1,10 +1,11 @@ #include <stdint.h> -#if unix+#if unix || __APPLE__  #include <netinet/in.h> #include <netinet/tcp.h> #include <sys/socket.h>+#include <sys/time.h> #include <sys/types.h>  typedef socklen_t my_socklen_t;@@ -31,7 +32,7 @@  int c_getsockopt_time(int sockfd, int level, int optname, int64_t *usec_out) {-#if unix+#if unix || __APPLE__     struct timeval tv;     my_socklen_t optlen = sizeof(tv);     int rc = getsockopt(sockfd, level, optname, (void *) &tv, &optlen);@@ -54,7 +55,7 @@  int c_setsockopt_time(int sockfd, int level, int optname, int64_t usec) {-#if unix+#if unix || __APPLE__     struct timeval tv;      if (usec <= 0) {
network-socket-options.cabal view
@@ -1,5 +1,5 @@ name:                network-socket-options-version:             0.2+version:             0.2.0.1 synopsis:            Type-safe, portable alternative to getSocketOption/setSocketOption description:     The network package provides getSocketOption and setSocketOption functions.