You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build failure on old versions of macOS (prior to 10.9):
In file included from psutil/arch/osx/net.c:12:
/usr/include/net/if.h:306:19: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:307:19: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifru_dstaddr;
^
/usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:308:19: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifru_broadaddr;
^
/usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:352:18: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifra_addr;
^
/usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:353:18: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifra_broadaddr;
^
/usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:354:18: error: field has incomplete type 'struct sockaddr'
struct sockaddr ifra_mask;
^
/usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'
struct sockaddr ifru_addr;
^
/usr/include/net/if.h:437:26: error: field has incomplete type 'struct sockaddr_storage'
struct sockaddr_storage addr; /* in/out */
^
/usr/include/net/if.h:437:9: note: forward declaration of 'struct sockaddr_storage'
struct sockaddr_storage addr; /* in/out */
^
/usr/include/net/if.h:438:26: error: field has incomplete type 'struct sockaddr_storage'
struct sockaddr_storage dstaddr; /* out */
^
/usr/include/net/if.h:437:9: note: forward declaration of 'struct sockaddr_storage'
struct sockaddr_storage addr; /* in/out */
^
8 errors generated.
This is a common problem, caused by <net/if.h> on OS X versions earlier than 10.9 not including <sys/socket.h>. The solution is to include <sys/socket.h> yourself before including <net/if.h>. (So much for my recommendation to include headers in alphabetical order!) I'll send a PR.
The text was updated successfully, but these errors were encountered:
Summary
if_dl.h: error: unknown type name 'u_char'; did you mean 'char'?
#2360 and [macOS] error: unknown type name 'CFTimeInterval' #2362Description
Build failure on old versions of macOS (prior to 10.9):
This is a common problem, caused by <net/if.h> on OS X versions earlier than 10.9 not including <sys/socket.h>. The solution is to include <sys/socket.h> yourself before including <net/if.h>. (So much for my recommendation to include headers in alphabetical order!) I'll send a PR.
The text was updated successfully, but these errors were encountered: