diff --git a/ares/m4/cares-functions.m4 b/ares/m4/cares-functions.m4
index 668886ebdb62146956e16e2e567aa2c1975741d7..245e93bd040a7640b4009f3fa1a64aed1b3fc77e 100644
--- a/ares/m4/cares-functions.m4
+++ b/ares/m4/cares-functions.m4
@@ -16,7 +16,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 23
+# serial 24
 
 
 dnl CARES_INCLUDES_ARPA_INET
@@ -1161,7 +1161,7 @@ AC_DEFUN([CARES_CHECK_FUNC_INET_PTON], [
             (ipv6a[13] != 0x0b) ||
             (ipv6a[14] != 0x76) ||
             (ipv6a[15] != 0xc8) ||
-            (ipv6a[25] != 0x01) )
+            (ipv6a[16] != 0x01) )
           exit(1); /* fail */
         /* - */
         if( (ipv6a[2]  != 0x0) ||
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index 58756a10d42d55cfcbc212eb1817de837329c172..d5d4da45499cc067853e950fc20c8552d70ff692 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -22,7 +22,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 40
+# serial 41
 
 
 dnl CURL_INCLUDES_ARPA_INET
@@ -2265,7 +2265,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
             (ipv6a[13] != 0x0b) ||
             (ipv6a[14] != 0x76) ||
             (ipv6a[15] != 0xc8) ||
-            (ipv6a[25] != 0x01) )
+            (ipv6a[16] != 0x01) )
           exit(1); /* fail */
         /* - */
         if( (ipv6a[2]  != 0x0) ||