OpenSSL: use nondeprecated EC-group functions under 3.0.0.
[exim.git] / src / src / debug.c
index 90c48dde407e2ebf3b8abe5a12585ee11a7fd08d..92cad6d4817b4652a498577ecdb02e41b3ab1814 100644 (file)
@@ -3,6 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2015 - 2021 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -31,6 +32,7 @@ const uschar * rc_names[] = {         /* Mostly for debug output */
   [CANCELLED] =                US"CANCELLED",
   [FAIL_SEND] =                US"FAIL_SEND",
   [FAIL_DROP] =                US"FAIL_DROP",
+  [DANE] =             US"DANE",
 };
 
 const uschar * dns_rc_names[] = {
@@ -351,7 +353,7 @@ if (fstat(fd, &s) == 0 && (s.st_mode & S_IFMT) == S_IFSOCK)
        g = string_fmt_append(g, " lcl [%s]:%u",
          inet_ntoa(sinp->sin_addr), ntohs(sinp->sin_port));
        alen = sizeof(*sinp);
-       if (getpeername(fd, sinp, &alen) == 0)
+       if (getpeername(fd, (struct sockaddr *)sinp, &alen) == 0)
          g = string_fmt_append(g, " rmt [%s]:%u",
            inet_ntoa(sinp->sin_addr), ntohs(sinp->sin_port));
        break;
@@ -363,7 +365,7 @@ if (fstat(fd, &s) == 0 && (s.st_mode & S_IFMT) == S_IFSOCK)
          inet_ntop(AF_INET6, &sin6p->sin6_addr, CS buf, sizeof(buf)),
          ntohs(sin6p->sin6_port));
        alen = sizeof(*sin6p);
-       if (getpeername(fd, sin6p, &alen) == 0)
+       if (getpeername(fd, (struct sockaddr *)sin6p, &alen) == 0)
          g = string_fmt_append(g, " rmt [%s]:%u",
            inet_ntop(AF_INET6, &sin6p->sin6_addr, CS buf, sizeof(buf)),
            ntohs(sin6p->sin6_port));
@@ -376,7 +378,7 @@ if (fstat(fd, &s) == 0 && (s.st_mode & S_IFMT) == S_IFSOCK)
             sunp->sun_path[0] ? US"" : US"@",
             sunp->sun_path[0] ? sunp->sun_path : sunp->sun_path+1);
         alen = sizeof(*sunp);
-        if (getpeername(fd, sunp, &alen) == 0)
+        if (getpeername(fd, (struct sockaddr *)sunp, &alen) == 0)
           g = string_fmt_append(g, " rmt %s%s",
             sunp->sun_path[0] ? US"" : US"@",
             sunp->sun_path[0] ? sunp->sun_path : sunp->sun_path+1);