diff --git a/share/libc/netinet/tcp.h b/share/libc/netinet/tcp.h
index d52d17fee1459b119b4ee9a97056cfccf4912cb8..db1c52f8a1cf2bed3648147fc2679f88c68e49dc 100644
--- a/share/libc/netinet/tcp.h
+++ b/share/libc/netinet/tcp.h
@@ -343,6 +343,9 @@ struct tcp_cookie_transactions
 
 #endif /* Misc.  */
 
+// The definition below appears on macOS, but it is neither POSIX nor in glibc
+#define TCP_KEEPALIVE 0x10
+
 __END_DECLS
 __POP_FC_STDLIB