Change in libosmocore[master]: socket.c: build multiaddr socket API helpers only if used by public APIs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Oct 24 13:43:04 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15870 )


Change subject: socket.c: build multiaddr socket API helpers only if used by public APIs
......................................................................

socket.c: build multiaddr socket API helpers only if used by public APIs

Those two functions are only used by osmo_sock_init2_multiaddr(), which
is only built if HAVE_LIBSCTP is defined. Avoid compiler warning about
unusued function helpers if osmo_sock_init2_multiaddr() is not being
built.

Change-Id: I52769d6b8f70af1a8bda23d60b3230a932e71fab
---
M src/socket.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/15870/1

diff --git a/src/socket.c b/src/socket.c
index 4752881..9b1d30e 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -100,6 +100,7 @@
 	return result;
 }
 
+#ifdef HAVE_LIBSCTP
 /*! Retrieve an array of addrinfo with specified hints, one for each host in the hosts array.
  *  \param[out] addrinfo array of addrinfo pointers, will be filled by the function on success.
  *		Its size must be at least the one of hosts.
@@ -127,6 +128,7 @@
 	}
 	return 0;
 }
+#endif /* HAVE_LIBSCTP*/
 
 static int socket_helper(const struct addrinfo *rp, unsigned int flags)
 {
@@ -150,6 +152,7 @@
 	return sfd;
 }
 
+#ifdef HAVE_LIBSCTP
 /* Fill buf with a string representation of the address set, in the form:
  * buf_len == 0: "()"
  * buf_len == 1: "hostA"
@@ -181,6 +184,7 @@
 
 	return len;
 }
+#endif /* HAVE_LIBSCTP */
 
 static int osmo_sock_init_tail(int fd, uint16_t type, unsigned int flags)
 {

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15870
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I52769d6b8f70af1a8bda23d60b3230a932e71fab
Gerrit-Change-Number: 15870
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191024/cfc713e2/attachment.htm>


More information about the gerrit-log mailing list