Skip to content

Commit d235fc7

Browse files
committed
solaris: fix unused variables
These only get used under linux. Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 535e111 commit d235fc7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/common/kqueue.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,23 @@ get_fd_limit(void)
8080
unsigned int
8181
get_fd_used(void)
8282
{
83+
#ifdef __linux__
8384
unsigned int fd_max = get_fd_limit();
8485
unsigned int i;
8586
unsigned int used = 0;
8687
int our_errno = errno; /* Preserve errno */
8788

88-
#ifdef __linux__
8989
for (i = 0; i < fd_max; i++) {
9090
if (fcntl(i, F_GETFD) == 0)
9191
used++;
9292
}
93-
#endif
9493

9594
errno = our_errno;
9695

9796
return used;
97+
#else
98+
return 0;
99+
#endif
98100
}
99101

100102
static struct map *kqmap;

0 commit comments

Comments
 (0)