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
This commit is contained in:
david 2014-04-11 05:08:30 +00:00
parent f83dc2c6c2
commit 31e4350dba

View file

@ -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 "