diff --git a/libs/libnotimpl/src/math.c b/libs/libnotimpl/src/math.c index 66bcb6292..31e62931a 100644 --- a/libs/libnotimpl/src/math.c +++ b/libs/libnotimpl/src/math.c @@ -111,3 +111,18 @@ return (long) ((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x)); } +/* lround for uClibc + * + * wrapper for roundf(x) + */ + +#ifdef __STDC__ + float roundf(float x) +#else + float round(x) + float x; +#endif +{ + return (float) ((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x)); +} +