]> git.proxmox.com Git - mirror_frr.git/commitdiff
pim6d: fix Linux kernel header macro
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 3 May 2022 12:56:57 +0000 (14:56 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 6 May 2022 10:06:27 +0000 (12:06 +0200)
__KERNEL_DIV_ROUND_UP isn't in older versions of linux/const.h.  Rather
than pull in more headers, just inline the definition.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
include/linux/mroute6.h

index 1fb90ec0219d2a6f48549052222eb8548dd9219d..8c0640671a6e7c6bf7afe80981b59efd94538f9f 100644 (file)
@@ -63,7 +63,8 @@ typedef       uint32_t        if_mask;
 #define NIFBITS (sizeof(if_mask) * 8)        /* bits per mask */
 
 typedef struct if_set {
-       if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
+       /* __KERNEL_DIV_ROUND_UP() */
+       if_mask ifs_bits[(IF_SETSIZE + NIFBITS - 1) / NIFBITS];
 } if_set;
 
 #define IF_SET(n, p)    ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))