mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Move the ifr_ifindex FreeBSD definition into a header file to reduce code duplication
This commit is contained in:
parent
3f31935cac
commit
aafe815556
6 changed files with 4 additions and 17 deletions
|
|
@ -39,10 +39,6 @@
|
||||||
#include "module-netjack2/peer.c"
|
#include "module-netjack2/peer.c"
|
||||||
#include "network-utils.h"
|
#include "network-utils.h"
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#define ifr_ifindex ifr_index
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef IPTOS_DSCP
|
#ifndef IPTOS_DSCP
|
||||||
#define IPTOS_DSCP_MASK 0xfc
|
#define IPTOS_DSCP_MASK 0xfc
|
||||||
#define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK)
|
#define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK)
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@
|
||||||
#include "network-utils.h"
|
#include "network-utils.h"
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#define ifr_ifindex ifr_index
|
|
||||||
#define SO_PASSCRED LOCAL_CREDS_PERSISTENT
|
#define SO_PASSCRED LOCAL_CREDS_PERSISTENT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,6 @@
|
||||||
#include <module-rtp/stream.h>
|
#include <module-rtp/stream.h>
|
||||||
#include "network-utils.h"
|
#include "network-utils.h"
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#define ifr_ifindex ifr_index
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** \page page_module_rtp_session RTP session
|
/** \page page_module_rtp_session RTP session
|
||||||
*
|
*
|
||||||
* The `rtp-session` module creates a media session that is announced
|
* The `rtp-session` module creates a media session that is announced
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
#include <module-rtp/stream.h>
|
#include <module-rtp/stream.h>
|
||||||
#include "network-utils.h"
|
#include "network-utils.h"
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#define ifr_ifindex ifr_index
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** \page page_module_rtp_source RTP source
|
/** \page page_module_rtp_source RTP source
|
||||||
*
|
*
|
||||||
* The `rtp-source` module creates a PipeWire source that receives audio
|
* The `rtp-source` module creates a PipeWire source that receives audio
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
#include <module-vban/stream.h>
|
#include <module-vban/stream.h>
|
||||||
#include "network-utils.h"
|
#include "network-utils.h"
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#define ifr_ifindex ifr_index
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** \page page_module_vban_recv VBAN receiver
|
/** \page page_module_vban_recv VBAN receiver
|
||||||
*
|
*
|
||||||
* The `vban-recv` module creates a PipeWire source that receives audio
|
* The `vban-recv` module creates a PipeWire source that receives audio
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#define ifr_ifindex ifr_index
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline int pw_net_parse_address(const char *address, uint16_t port,
|
static inline int pw_net_parse_address(const char *address, uint16_t port,
|
||||||
struct sockaddr_storage *addr, socklen_t *len)
|
struct sockaddr_storage *addr, socklen_t *len)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue