mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
Use pulsecore/arpa-inet.h to make arpa/inet.h functionality available
Automatically use replacement function on platforms (win32) where not all arpa/inet.h is available natively.
This commit is contained in:
parent
09d7baec64
commit
c470680e1b
21 changed files with 69 additions and 141 deletions
23
src/pulsecore/arpa-inet.h
Normal file
23
src/pulsecore/arpa-inet.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef fooarpa_inethfoo
|
||||
#define fooarpa_inethfoo
|
||||
|
||||
|
||||
#if defined(HAVE_ARPA_INET_H)
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#elif defined(OS_IS_WIN32)
|
||||
|
||||
/* On Windows winsock2.h (here included via pulsecore/socket.h) provides most of the functionality of arpa/inet.h, except for
|
||||
* the inet_ntop and inet_pton functions, which are implemented here. */
|
||||
|
||||
#include <pulsecore/socket.h>
|
||||
|
||||
const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
|
||||
|
||||
int inet_pton(int af, const char *src, void *dst);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue