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

Fix compilation error with old libpcap #25

Merged
merged 1 commit into from
Mar 13, 2020
Merged

Conversation

idosch
Copy link
Collaborator

@idosch idosch commented Mar 13, 2020

libpcap commit 98e570c4d970 ("Make the second argument to pcap_perror()
const.") added 'const' qualifier to the second argument of
pcap_perror().

However, this commit is only present in libpcap-1.8, whereas some
distributions are still shipping older versions.

This results in compilation errors such as:

dwdump.c:520:36: error: passing argument 2 of ‘pcap_perror’ discards
‘const’ qualifier from pointer target type
[-Werror=discarded-qualifiers]

Fix this by passing the name of the function that failed - as we do with
perror() - instead of passing the name of the dump file that
pcap_dump_open() failed to open.

Fixes: 1994409 ("Add dwdump utility to dump kernel dropped packets to a file")
Signed-off-by: Ido Schimmel idosch@mellanox.com

libpcap commit 98e570c4d970 ("Make the second argument to pcap_perror()
const.") added 'const' qualifier to the second argument of
pcap_perror().

However, this commit is only present in libpcap-1.8, whereas some
distributions are still shipping older versions.

This results in compilation errors such as:

```
dwdump.c:520:36: error: passing argument 2 of ‘pcap_perror’ discards
‘const’ qualifier from pointer target type
[-Werror=discarded-qualifiers]
```

Fix this by passing the name of the function that failed - as we do with
perror() - instead of passing the name of the dump file that
pcap_dump_open() failed to open.

Fixes: 1994409 ("Add dwdump utility to dump kernel dropped packets to a file")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
@idosch
Copy link
Collaborator Author

idosch commented Mar 13, 2020

Fixes #22

@idosch idosch merged commit 9396e14 into nhorman:master Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant