ntbtls-cli: Use union to access hostent addr.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 8 Nov 2018 21:21:25 +0000 (06:21 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 8 Nov 2018 21:21:25 +0000 (06:21 +0900)
commitac406d38e49d4bbe2c6b41680abf7c717ce9b393
tree5cce5ac1c06cac63aec15e45a29b3da6b61e8394
parent4b7c6a91f56c2bd5baa859146298f8f20519313f
ntbtls-cli: Use union to access hostent addr.

* src/ntbtls-cli.c (connect_server): Use union.

--

Unfortunately, the API of gethostbyname was designed in old style of
C.  Modern compiler emits warnings for its access to h_addr of char *
on a machine of different alignment requirement for other
objects.  (It should be defined as void *, in new style.)

As a workaround, we use union here.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
src/ntbtls-cli.c