[gssdp: 1/2] Fix support for IPV6_PKTINFO on macOS
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp: 1/2] Fix support for IPV6_PKTINFO on macOS
- Date: Mon, 19 Nov 2018 22:02:19 +0000 (UTC)
commit 8b333104cfaed32fb657b3354b36ac3b51342b38
Author: Tom Schoonjans <Tom Schoonjans diamond ac uk>
Date: Fri Nov 16 12:39:28 2018 +0000
Fix support for IPV6_PKTINFO on macOS
Apparently IPV6_PKTINFO is not defined on macOS, unless
__APPLE_USE_RFC_3542 is defined before including <netinet.h>.
libgssdp/gssdp-pktinfo6-message.c | 4 ++++
libgssdp/gssdp-socket-functions.c | 4 ++++
2 files changed, 8 insertions(+)
---
diff --git a/libgssdp/gssdp-pktinfo6-message.c b/libgssdp/gssdp-pktinfo6-message.c
index 4f373b4..320240b 100644
--- a/libgssdp/gssdp-pktinfo6-message.c
+++ b/libgssdp/gssdp-pktinfo6-message.c
@@ -21,6 +21,10 @@
#define _GNU_SOURCE
+#ifdef __APPLE__
+#define __APPLE_USE_RFC_3542
+#endif
+
#include <sys/socket.h>
#include <netinet/ip.h>
diff --git a/libgssdp/gssdp-socket-functions.c b/libgssdp/gssdp-socket-functions.c
index 457cd66..48cce65 100644
--- a/libgssdp/gssdp-socket-functions.c
+++ b/libgssdp/gssdp-socket-functions.c
@@ -23,6 +23,10 @@
#include <config.h>
#endif /* HAVE_CONFIG_H */
+#ifdef __APPLE__
+#define __APPLE_USE_RFC_3542
+#endif
+
#include "gssdp-error.h"
#include "gssdp-socket-functions.h"
#include "gssdp-pktinfo-message.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]