-
Notifications
You must be signed in to change notification settings - Fork 603
Fix ./configure EUI check #2338
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 ./configure EUI check #2338
Conversation
1. Fix missing header `sys/socket.h` ``` configure:29217: checking for struct arpreq.arp_pa .../net/if_arp.h:89:18: error: field has incomplete type 'struct sockaddr' ``` 2. Fix ac_aggr.arp_pa test ``` conftest.cpp:112:5: error: value of type 'struct sockaddr' is not contextually convertible to 'bool' ```
This comment was marked as resolved.
This comment was marked as resolved.
The problem here is that HAVE_SYS_SOCKET_H is not defined yet at that point, so it's skipped and the check fails.
So use particular member ( |
rousskov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix and useful triage details.
| #endif | ||
| ]]) | ||
| AC_CHECK_MEMBER([struct arpreq.arp_pa],[],[ | ||
| AC_CHECK_HEADERS(sys/socket.h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that HAVE_SYS_SOCKET_H is not defined yet at that point, so it's skipped and the check fails.
I'm not sure how to fix it better like remove
#if HAVE_SYS_SOCKET_Hcondition and let the header be included unconditionally, or include this header into some AC_CHECK_HEADERS a bit above, or something else. So please guide me how you wanted me this to do
I think what you did is the right solution for this PR -- it matches how similar code solves similar problems. There may be a better, more comprehensive solution, but I would place that outside this small/focused PR scope.
This comment answers a question without requesting any changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the checks here should be including our compat/types.h and compat/socket.h instead of the system headers. But that will still need this change first (along with other headers tested). So I am putting that on my TODO list for later, no need to do it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the checks here should be including our
compat/types.handcompat/socket.h
I am against using compat/ sources in ./configure checks because that would imply that compat/ sources cannot reliably use ./configure results. However, there is now a better place for that discussion. Let's continue this conversation there.
Squid never uses arpreq.arp_pa.sa_family. Squid uses arpreq.arp_ha.sa_family, among other arpreq.arp_ha members.
| #endif | ||
| ]]) | ||
| AC_CHECK_MEMBER([struct arpreq.arp_pa],[],[ | ||
| AC_CHECK_HEADERS(sys/socket.h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the checks here should be including our
compat/types.handcompat/socket.h
I am against using compat/ sources in ./configure checks because that would imply that compat/ sources cannot reliably use ./configure results. However, there is now a better place for that discussion. Let's continue this conversation there.
|
I adjusted the title to make it specific to |
kinkie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's get this fixed for now, and we can improve later
Fix missing header `sys/socket.h`:
configure:29217: checking for struct arpreq.arp_pa
.../net/if_arp.h: error: field has incomplete type 'struct sockaddr'
Fix `ac_aggr.arp_pa` test, replacing it with a test of a data member
that Squid code is actually using:
conftest.cpp:112:5: error: value of type 'struct sockaddr' is not
contextually convertible to 'bool'
Discovered while porting Squid v7 to FreeBSD.
Fix missing header `sys/socket.h`:
configure:29217: checking for struct arpreq.arp_pa
.../net/if_arp.h: error: field has incomplete type 'struct sockaddr'
Fix `ac_aggr.arp_pa` test, replacing it with a test of a data member
that Squid code is actually using:
conftest.cpp:112:5: error: value of type 'struct sockaddr' is not
contextually convertible to 'bool'
Discovered while porting Squid v7 to FreeBSD.
|
queued for backport to v7 |
Fix missing header
sys/socket.h:Fix
ac_aggr.arp_patest, replacing it with a test of a data memberthat Squid code is actually using:
Discovered while porting Squid v7 to FreeBSD.