diff --git a/Misc/NEWS.d/next/macOS/2020-04-07-01-39-52.bpo-40060.9Y0s-a.rst b/Misc/NEWS.d/next/macOS/2020-04-07-01-39-52.bpo-40060.9Y0s-a.rst new file mode 100644 index 000000000000000..3c8884a5652292d --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2020-04-07-01-39-52.bpo-40060.9Y0s-a.rst @@ -0,0 +1 @@ +Expose socket.TCP_NOTSENT_LOWAT on macOS in official builds \ No newline at end of file diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 580ac0af5aff59c..b0c81a8c86d7451 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -8228,6 +8228,11 @@ PyInit__socket(void) #ifdef TCP_USER_TIMEOUT PyModule_AddIntMacro(m, TCP_USER_TIMEOUT); #endif +#ifndef TCP_NOTSENT_LOWAT +# ifdef __APPLE__ +# define TCP_NOTSENT_LOWAT 0x201 +# endif +#endif #ifdef TCP_NOTSENT_LOWAT PyModule_AddIntMacro(m, TCP_NOTSENT_LOWAT); #endif