pidgin/pidgin

Parents 7df95db772d8
Children fb6e46c4c63c
Hide common_sockaddr_t as it needs to be removed but it's causing issues now

As mentioned in https://reviews.imfreedom.org/r/14/ this is my current fix for the `common_sockaddr_t` problem. And that is to just hide. By hiding it, we make the core network api and bonjour uses of it independent which means we can swap the out individually with smaller review requests.

Hide common_sockaddr_t as it needs to be removed but it's causing issues now

Reviewed at https://reviews.imfreedom.org/r/15/
--- a/libpurple/network.c Sun Jul 05 04:29:48 2020 -0500
+++ b/libpurple/network.c Mon Jul 13 03:38:46 2020 -0500
@@ -60,6 +60,14 @@
# define HX_SIZE_OF_IFREQ(a) sizeof(a)
#endif
+typedef union
+{
+ struct sockaddr sa;
+ struct sockaddr_in in;
+ struct sockaddr_in6 in6;
+ struct sockaddr_storage storage;
+} common_sockaddr_t;
+
struct _PurpleNetworkListenData {
int listenfd;
int socket_type;
--- a/libpurple/network.h Sun Jul 05 04:29:48 2020 -0500
+++ b/libpurple/network.h Mon Jul 13 03:38:46 2020 -0500
@@ -40,14 +40,6 @@
# include <sys/socket.h>
#endif
-typedef union
-{
- struct sockaddr sa;
- struct sockaddr_in in;
- struct sockaddr_in6 in6;
- struct sockaddr_storage storage;
-} common_sockaddr_t;
-
G_BEGIN_DECLS
/**************************************************************************/
--- a/libpurple/protocols/bonjour/bonjour_ft.c Sun Jul 05 04:29:48 2020 -0500
+++ b/libpurple/protocols/bonjour/bonjour_ft.c Mon Jul 13 03:38:46 2020 -0500
@@ -34,6 +34,14 @@
#include "bonjour.h"
#include "bonjour_ft.h"
+typedef union
+{
+ struct sockaddr sa;
+ struct sockaddr_in in;
+ struct sockaddr_in6 in6;
+ struct sockaddr_storage storage;
+} common_sockaddr_t;
+
static void
bonjour_bytestreams_init(PurpleXfer *xfer);
static void