Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcpdump.c: Fix a warning when HAVE_FORK and HAVE_VFORK are not defined #1316

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

fxlb
Copy link
Member

@fxlb fxlb commented Apr 3, 2025

The warning was:
tcpdump.c:226:13: warning: unused function 'child_cleanup'
[-Wunused-function] static void child_cleanup(int);

The warning was:
tcpdump.c:226:13: warning: unused function 'child_cleanup'
  [-Wunused-function] static void child_cleanup(int);
@infrastation
Copy link
Member

What is the supported platform that has neither of those?

@fxlb
Copy link
Member Author

fxlb commented Apr 3, 2025

Found in history:

commit d8252d0c05900bcbf9afaf91cae1cd0580bd3aab
Author: Guy Harris <[email protected]>
Date:   Tue Nov 30 16:18:32 2010 -0800

    Add support for nommu systems.
    
    Rather than hardcode the WIN32 define, add proper fork checks to the
    configure script and check those.  This fixes building for nommu systems
    which lack the fork function.

@fxlb
Copy link
Member Author

fxlb commented Apr 3, 2025

Found when testing with libpcap's config.h, which does not define HAVE_FORK or HAVE_VFORK .

@infrastation
Copy link
Member

At the very least it makes the forward declaration consistent.

@fxlb fxlb merged commit 56a7c96 into the-tcpdump-group:master Apr 4, 2025
21 checks passed
@fxlb fxlb deleted the fork branch April 4, 2025 18:48
@fxlb
Copy link
Member Author

fxlb commented Apr 6, 2025

What is the supported platform that has neither of those?

Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants