From: Eric Dumazet Date: Wed, 30 Nov 2011 23:32:14 +0000 (+0000) Subject: netem: fix build error on 32bit arches X-Git-Tag: firefly_0821_release~3680^2~3834^2~387 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fc33cc72423ed3474cd51bc8bd7c1cdc22a78e1a;p=firefly-linux-kernel-4.4.55.git netem: fix build error on 32bit arches ERROR: "__udivdi3" [net/sched/sch_netem.ko] undefined! Signed-off-by: Eric Dumazet Acked-by: Hagen Paul Pfeifer Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 9b7af9f1272f..3bfd73344f76 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -301,7 +301,10 @@ static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma, static psched_time_t packet_len_2_sched_time(unsigned int len, u32 rate) { - return PSCHED_NS2TICKS((u64)len * NSEC_PER_SEC / rate); + u64 ticks = (u64)len * NSEC_PER_SEC; + + do_div(ticks, rate); + return PSCHED_NS2TICKS(ticks); } /*