Skip to content

Commit

Permalink
Fix build with --disable-ipv6
Browse files Browse the repository at this point in the history
Otheriwse build breaks with:

fping.c:690:24: error: ‘socket6’ undeclared (first use in this function);
did you mean ‘socket4’?
  • Loading branch information
Lars Wendler committed Sep 18, 2018
1 parent f9e1964 commit aa4a5f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fping.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,11 @@ int main(int argc, char** argv)

/* validate various option settings */

if (socket4 < 0 && socket6 < 0) {
if (socket4 < 0
#ifdef IPV6
&& socket6 < 0
#endif
) {
crash_and_burn("can't create socket (must run as root?)");
}

Expand Down

2 comments on commit aa4a5f6

@jer-gentoo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, in line 692 a tab is used instead of spaces, and it doesn't align with the opening bracket from line 690. :-)

@schweikert
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)

Please sign in to comment.