From d1caa9df07d07a9c2897d106fe5fb7f4b595203e Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 21 Nov 2025 21:37:05 -0800 Subject: [PATCH] unix/modsocket: Add IP ADD and DROP MEMBERSHIP to socket constants. Add the IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP to modsocket in the Unix port so that the directives take on the values defined in the system headers. This is needed because the values of these directives are different for MacOS vs other Unix systems. Fixes issue #8456. Signed-off-by: Alex Tran --- ports/unix/modsocket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/unix/modsocket.c b/ports/unix/modsocket.c index e7f25cdd43..660ace79b5 100644 --- a/ports/unix/modsocket.c +++ b/ports/unix/modsocket.c @@ -709,6 +709,9 @@ static const mp_rom_map_elem_t mp_module_socket_globals_table[] = { C(SO_KEEPALIVE), C(SO_LINGER), C(SO_REUSEADDR), + + C(IP_ADD_MEMBERSHIP), + C(IP_DROP_MEMBERSHIP), #undef C };