Opened 3 years ago
Last modified 3 years ago
#67982 assigned defect
py*-grpcio: missing includes for if_nametoindex
| Reported by: | jmroot (Joshua Root) | Owned by: | emcrisostomo (Enrico Maria Crisostomo) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | mascguy (Christopher Nielsen) | |
| Port: | grpc |
Description
On macOS (and also FreeBSD), using if_nametoindex is documented to require these includes:
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
But grpc_if_nametoindex_posix.cc only includes net/if.h, and depending on the exact version of your libc headers can fail to compile like this:
In file included from src/core/lib/iomgr/grpc_if_nametoindex_posix.cc:26:
/usr/include/net/if.h:306:19: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifru_addr;
^
Any fix should be sent upstream of course, but I'm not sure if unconditionally adding these extra includes could cause problems on other platforms they support.
Change History (2)
comment:1 Changed 3 years ago by jmroot (Joshua Root)
| Owner: | set to emcrisostomo |
|---|---|
| Status: | new → assigned |
comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)
| Cc: | mascguy added |
|---|
Note: See
TracTickets for help on using
tickets.
