--- Modules/socketmodule.c.t 2021-10-21 13:08:26.000000000 -0700 +++ Modules/socketmodule.c 2021-10-21 13:09:44.000000000 -0700 @@ -515,6 +515,11 @@ #include <sys/poll.h> #endif +/* We undefine this because it was causing problems on macOS 11.5.1, and doesn't appear to be needed much. */ +#ifdef __APPLE__ +#undef AF_VSOCK +#endif + /* Largest value to try to store in a socklen_t (used when handling ancillary data). POSIX requires socklen_t to hold at least (2**31)-1 and recommends against storing larger values, but