libm alternative in ports

Anonymous swell.k at
Thu Nov 25 08:21:06 UTC 2010

Alexander Best <arundel at> writes:

> hi there,
> does anybody if there's an alternative for libm in the ports dir? i need it,
> because the newest snapshots of mplayer require log2() and log2f(), which the
> base libm doesn't support.

for mplayer I'd suggest using code from x264 because both projects use GPLv2+

  #if !HAVE_LOG2F
  #define log2f(x) (logf(x)/0.693147180559945f)
  #define log2(x) (log(x)/0.693147180559945)

More information about the freebsd-questions mailing list