X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fprotocol-plugin%2Fplugins%2Fmqtt-fan%2Flib%2Fnet_mosq.c;h=4329e3c8a066d4364440afc8a0f168ab581fbbfd;hb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;hp=517a485c46a68ddd10d9a2c3ec6031e1ecb7cc11;hpb=00b3660e45c56cb3db35dc2596a054f801b5591a;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/protocol-plugin/plugins/mqtt-fan/lib/net_mosq.c b/service/protocol-plugin/plugins/mqtt-fan/lib/net_mosq.c index 517a485..4329e3c 100644 --- a/service/protocol-plugin/plugins/mqtt-fan/lib/net_mosq.c +++ b/service/protocol-plugin/plugins/mqtt-fan/lib/net_mosq.c @@ -27,6 +27,19 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _POSIX_C_SOURCE +// Defining _POSIX_C_SOURCE macro with 200112L (or greater) as value +// causes header files to expose definitions +// corresponding to the POSIX.1-2001 base +// specification (excluding the XSI extension). +// For POSIX.1-2001 base specification, +// Refer http://pubs.opengroup.org/onlinepubs/009695399/ +// +// For this specific file, see use of getaddrinfo & structs, +// Refer http://man7.org/linux/man-pages/man3/getaddrinfo.3.html +#define _POSIX_C_SOURCE 200112L // needed for getaddrinfo & structs +#endif + #include #include #include