tcpclientsrc, tcpserversrc: fix building for musl

musl only exposes struct tcp_info when _GNU_SOURCE is defined.

Fixes: b4bef7fd35 ("tcpclientsrc, tcpserversrc: fix tcp stats gathering")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8612>
This commit is contained in:
Alyssa Ross 2025-03-11 12:43:55 +01:00
parent 7b98c739c8
commit bfd995f9df

View File

@ -2,6 +2,8 @@
#include "config.h"
#endif
#define _GNU_SOURCE /* struct tcp_info */
/* macOS and iOS have the .h files but the tcp_info struct is private API */
#if defined(HAVE_NETINET_TCP_H) && defined(HAVE_NETINET_IN_H) && defined(HAVE_SYS_SOCKET_H)
#include <netinet/tcp.h>