trusteddomainproject / OpenDKIM

Other
97 stars 52 forks source link

HAVE_RES_SETSERVERS leads to syntax error #199

Open lundman opened 9 months ago

lundman commented 9 months ago
--- dkim-dns.c  Fri Feb  9 14:22:49 2024
+++ new-dkim-dns.c      Fri Feb  9 14:22:35 2024
@@ -276,7 +276,7 @@
        struct sockaddr_in6 in6;
 # endif /* AF_INET6 */
        struct state *res;
-       res_sockaddr_union nses[MAXNS];
+       union res_sockaddr_union nses[MAXNS];

        assert(srv != NULL);
        assert(nslist != NULL);
@@ -289,7 +289,7 @@

        for (ns = strtok_r(tmp, ",", &last);
             ns != NULL && nscount < MAXNS;
-            ns = strtok_r(NULL, ",", &last)
+            ns = strtok_r(NULL, ",", &last))
        {
                memset(&in, '\0', sizeof in);
 # ifdef AF_INET6

The missing union could just be old gcc. But the missing ) in the for-loop is surely never accepted?