patch 8.0.1709: some non-C89 code may slip through
Problem: Some non-C89 code may slip through.
Solution: Enforce C89 in configure. Fix detected problems. (James McCoy,
closes #2735)
diff --git a/src/channel.c b/src/channel.c
index a25e9fe..f5d86ed 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -672,9 +672,9 @@
{
char *p;
- /* When using host->h_addr directly ubsan warns for it to not be
- * aligned. First copy the pointer to aviod that. */
- memcpy(&p, &host->h_addr, sizeof(p));
+ /* When using host->h_addr_list[0] directly ubsan warns for it to not
+ * be aligned. First copy the pointer to avoid that. */
+ memcpy(&p, &host->h_addr_list[0], sizeof(p));
memcpy((char *)&server.sin_addr, p, host->h_length);
}