]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-ndisc: add missing cast
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Jun 2016 17:49:48 +0000 (19:49 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 14 Jun 2016 18:01:45 +0000 (20:01 +0200)
Apparently newer gcc versions are a bit more forgiving when assigning an
"unsigned char*" pointer to something of a different type. Let's add the
missing cast so that old gcc versions are fine, too.

src/libsystemd-network/sd-ndisc.c

index ea3fe369ce3133e8076a32a2c550fd3a6d30e21d..07b0d7f70493909bb626de9486d65b90880bc725 100644 (file)
@@ -307,7 +307,7 @@ static int ndisc_recv(sd_event_source *s, int fd, uint32_t revents, void *userda
                 if (cmsg->cmsg_level == SOL_SOCKET &&
                     cmsg->cmsg_type == SO_TIMESTAMP &&
                     cmsg->cmsg_len == CMSG_LEN(sizeof(struct timeval)))
-                        triple_timestamp_from_realtime(&rt->timestamp, timeval_load(CMSG_DATA(cmsg)));
+                        triple_timestamp_from_realtime(&rt->timestamp, timeval_load((struct timeval*) CMSG_DATA(cmsg)));
         }
 
         if (!triple_timestamp_is_set(&rt->timestamp))