Page MenuHomeFreeBSD

Unbreak on 11.x and 12.x

Authored by farrokhi on Jun 6 2017, 9:36 AM.



Fix build on 11.0 and later due to missing libpcap header file

Diff Detail

rP FreeBSD ports repository
No Linters Available
No Unit Test Coverage
Build Status
Buildable 10299
Build 10716: arc lint + arc unit

Event Timeline

I find it weird to include header files like that, newer version of libcap does not provide pcap-int.h, it is probably because it has been replaced by something, there might be a better approach to address this, I'll think about it and come back to you

Removed reference to unnecessary header files to unbreak on 11.x and 12.x

Turns out there was a much simpler solution for this build failure. By simply removing reference to "pcap-int.h" (which was not used at all) now this port builds on 10.x, 11.x and 12x just fine.

Unbreak on 11.x+ by removing reference to unused header file.

Also fixed an issue with creating RAW sockets which caused failure when tracing TCP/UDP (reported by Andrew Wu <>)


Maybe just add a && !defined(FreeBSD) which will be less intrusive

farrokhi marked an inline comment as done.

Use a less intrusive method to find out if we should include "pcap-int.h"

8 ↗(On Diff #30394)

Instead of changing this one, it seems to me more apropriate to modify lft_lib.h line 280 to also add a && !defined(FreeBSD)

8 ↗(On Diff #30394)

The change in lft_lib.h should also make that patch obsolete (needs testing)

farrokhi marked 2 inline comments as done.

Improve the logic when detecting when whether or not we should reverse byte order for ip_len and ip_off.

8 ↗(On Diff #30394)

True. I just adjusted the logic to disable SCREWED_IP_LEN flag if it is being built on FreeBSD so that byte order reversal will be done appropriately.

This revision is now accepted and ready to land.Jul 4 2017, 9:34 AM
This revision was automatically updated to reflect the committed changes.

Be sure to send these upstream as well

Be sure to send these upstream as well

Sure. I just did. Thanks for noting.