From 31e4350dba9a0f67d98cc28153507ee083a1ef89 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 11 Apr 2014 05:08:30 +0000 Subject: [PATCH] Make the argument to checked_fd_isset non-const. I got this error compiling on OS X 10.6: In file included from netutil.cc:132: ../nbase/nbase.h: In function 'int checked_fd_isset(int, const fd_set*)': ../nbase/nbase.h:385: error: invalid conversion from 'const fd_set*' to 'fd_set*' ../nbase/nbase.h:385: error: initializing argument 2 of 'int __darwin_fd_isset(int, fd_set*)' netutil.cc: In function 'int send_ipv6_ip(const sockaddr_in6*, const unsigned char*, size_t)': netutil.cc:3846: warning: unused variable 'tclass' make[2]: *** [netutil.o] Error 1 make[1]: *** [netutil_build] Error 2 --- nbase/nbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbase/nbase.h b/nbase/nbase.h index 7dff89662..9c570257c 100644 --- a/nbase/nbase.h +++ b/nbase/nbase.h @@ -373,7 +373,7 @@ extern "C" int vsnprintf (char *, size_t, const char *, va_list); #endif -static inline int checked_fd_isset(int fd, const fd_set *fds) { +static inline int checked_fd_isset(int fd, fd_set *fds) { #ifndef WIN32 if (fd >= FD_SETSIZE) { fprintf(stderr, "Attempt to FD_ISSET fd %d, which is not less than "