diff options
author | Paul Jakma <paul@jakma.org> | 2015-09-24 10:26:55 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2015-09-24 15:26:46 +0100 |
commit | 75daab1784f515104ceef747d134981ecee7b0af (patch) | |
tree | 59568423721f1ce51699451390e735ee07d93a7f | |
parent | e472b8a5141b91a4bb50f8ff55540cd601321572 (diff) | |
download | quagga-75daab1784f515104ceef747d134981ecee7b0af.tar.bz2 quagga-75daab1784f515104ceef747d134981ecee7b0af.tar.xz |
pimd: Fix compile warning (error with Werror) on BSD
* ioctl commands can vary in type between systems, cast to an unsigned long
before passing to format command.
-rw-r--r-- | pimd/pim_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 55545c15..880edb9a 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -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, |