-
Notifications
You must be signed in to change notification settings - Fork 528
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 build on GNU/Hurd #1417
Fix build on GNU/Hurd #1417
Conversation
Definitions of htonl() and htons() require these headers, in this order.
#if HAVE_ARPA_INET_H | ||
#include <arpa/inet.h> | ||
#endif | ||
|
||
static_assert(sizeof(RandomUuid) == 128/8, "RandomUuid has RFC 4122-prescribed 128-bit size"); |
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.
Definitions of htonl() and htons() require these headers, in this order.
A better fix would provide a Squid-specific header that can be included to get htonl() and similar declarations (and an automated check for that header inclusion) instead of chasing #include
violations one build failure at a time while we continue to copy-paste htonl() callers.
FWIW, here are some of the other source files that make htonl() or similar calls but do not explicitly include the two system headers added in this PR. Some of the entries on this list include one header and most get the right declarations indirectly (in most build environments), from places like sys/socket.h.
- lib/rfcnb/rfcnb-util.c: missing netinet/in.h
- src/CacheDigest.cc: missing both
- src/adaptation/icap/ServiceRep.cc: missing both
- src/auth/basic/RADIUS/Changelog: missing both
- src/auth/basic/RADIUS/basic_radius_auth.cc: missing arpa/inet.h
- src/auth/basic/RADIUS/radius-util.cc: missing arpa/inet.h
src/base/RandomUuid.cc: missing both- src/cache_cf.cc: missing both
- src/delay_pools.cc: missing both
- src/dns/rfc3596.cc: missing arpa/inet.h
- src/dns_internal.cc: missing both
- src/htcp.cc: missing both
- src/icmp/Icmp.cc: missing both
- src/icmp/net_db.cc: missing both
- src/icp_v2.cc: missing both
- src/ip/Address.cc: missing netinet/in.h
- src/ip/Intercept.cc: missing arpa/inet.h
- src/ip/QosConfig.cc: missing both
- src/neighbors.cc: missing both
- src/peer_digest.cc: missing both
- src/store_digest.cc: missing both
- src/tests/testIcmp.cc: missing both
- src/wccp.cc: missing both
- src/wccp2.cc: missing both
Disclaimer: Manually, I have only checked a few entries on the above list.
Definitions of htonl() and htons() require these headers, in this order.
Definitions of htonl() and htons() require these headers, in this order.
queued for backport to v6 |
Definitions of htonl() and htons() require these headers, in this order.
Definitions of htonl() and htons() require these headers, in this order.