Skip to content

Commit

Permalink
netem: fix build error on 32bit arches
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Dec 1, 2011
1 parent 8aa953d commit fc33cc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit fc33cc7

Please sign in to comment.