[IOT-2539] clean implicit-function-declaration
authorGeorge Nash <george.nash@intel.com>
Mon, 31 Jul 2017 16:55:14 +0000 (09:55 -0700)
committerRick Bell <richard.s.bell@intel.com>
Mon, 18 Sep 2017 17:39:58 +0000 (17:39 +0000)
commit22f31f249a750fe5ec067fd56709fbd9239c783f
tree8c1dc7c360240c68f2b451d0961bfc472190a715
parentc999eae32065a04a73d7a51290709486ed703967
[IOT-2539] clean implicit-function-declaration

The pdu.c file was producing an implicit-function-declaration
warning for the ntohs() function. The ntohs function is part
of the arpa/inet.h header.  This is conditionally included
based on the HAVE_ARPA_INET_H macro. The HAVE_ARPA_INET_H
macro is defined in the iotivity_config.h header. So
iotivity_config.h must be included in pdu.c to properly detect
the macro.

It looks like some systems may supply the ntohs() function
without arpa/inet.h. So it is unclear if the call to the
function its self needs some added macros.

Change-Id: I7e19d65e1371d46b35d70a5ecdf06fb0b73152ff
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21683
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 9b704e02253b181f88c00aad98083bfeb55328ae)
resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c