Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Doing so can cause namespace collisions, as per, for example, firnsy/barnyard2#245.
Instead, define PCAP_SOCKET, and use that.
On Windows, this shouldn't break any APIs, as any code using the two active-mode APIs that return a socket handle would probably be assigning their return values to a SOCKET, and as, on Windows, we're defining PCAP_SOCKET as SOCKET, there would be no type clash.
On UN*Xes, this might break code that uses one of the two active-mode APIs that return a socket handle if those programs were written to assign the return values of those APIs to a SOCKET, as we're no longer defining SOCKET. However, as those APIs are only provided if libpcap is built with remote capture support - which is not the default - and as they're somewhat painful to use, there's probably little if any code that needs to compile for UN*X and that uses them. If there is any such code, it could do
and use PCAP_SOCKET.
(backported from commit 93bac35)