Index: sbin/ping/ping.c =================================================================== --- sbin/ping/ping.c +++ sbin/ping/ping.c @@ -920,7 +920,7 @@ if (n == 1) { struct timespec *tv = NULL; #ifdef SO_TIMESTAMP - struct cmsghdr *cmsg = (struct cmsghdr *)&ctrl; + struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); msg.msg_controllen = sizeof(ctrl); #endif