| 21 | |
| 22 | UPD. I guess we should should just make definitions conditional, like: |
| 23 | {{{ |
| 24 | /* macOS has a call similar to malloc_usable_size */ |
| 25 | #if defined(__APPLE__) |
| 26 | #include <AvailabilityMacros.h> |
| 27 | #include <malloc/malloc.h> |
| 28 | #define malloc_usable_size malloc_size |
| 29 | #if MAC_OS_X_VERSION_MIN_REQUIRED > 1060 |
| 30 | #define HA_HAVE_MALLOC_ZONE |
| 31 | #endif |
| 32 | #define TCP_KEEPIDLE TCP_KEEPALIVE |
| 33 | #if MAC_OS_X_VERSION_MIN_REQUIRED > 101003 |
| 34 | #define TCP_INFO TCP_CONNECTION_INFO |
| 35 | #define tcp_info tcp_connection_info |
| 36 | #endif |
| 37 | #endif |
| 38 | }}} |
| 39 | |
| 40 | Once it works, I will submit a fix to upstream too. |