]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Fix compile warning (error with Werror) on BSD
authorPaul Jakma <paul@jakma.org>
Thu, 24 Sep 2015 09:26:55 +0000 (10:26 +0100)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:33 +0000 (20:38 -0400)
* ioctl commands can vary in type between systems, cast to an unsigned long
  before passing to format command.

pimd/pim_cmd.c

index bbefdf3876aa5f66c83ee169894fd0de10074035..c3f0feb4e2e89b55711b9c955a0c4231ba7dbe83 100644 (file)
@@ -2344,8 +2344,11 @@ static void show_mroute_count(struct vty *vty)
     if (ioctl(qpim_mroute_socket_fd, SIOCGETSGCNT, &sgreq)) {
       int e = errno;
       vty_out(vty,
-         "ioctl(SIOCGETSGCNT=%d) failure for (S,G)=(%s,%s): errno=%d: %s%s",
-         SIOCGETSGCNT,
+         "ioctl(SIOCGETSGCNT=%lu) failure for (S,G)=(%s,%s): errno=%d: %s%s",
+         /* note that typeof ioctl defs can vary across platforms, from
+          * int, to unsigned int, to long unsigned int
+          */
+         (unsigned long)SIOCGETSGCNT,
          source_str,
          group_str,
          e,