Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netem: fix build error on 32bit arches

ERROR: "__udivdi3" [net/sched/sch_netem.ko] undefined!

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
fc33cc72 8aa953d0

+4 -1
+4 -1
net/sched/sch_netem.c
··· 301 301 302 302 static psched_time_t packet_len_2_sched_time(unsigned int len, u32 rate) 303 303 { 304 - return PSCHED_NS2TICKS((u64)len * NSEC_PER_SEC / rate); 304 + u64 ticks = (u64)len * NSEC_PER_SEC; 305 + 306 + do_div(ticks, rate); 307 + return PSCHED_NS2TICKS(ticks); 305 308 } 306 309 307 310 /*