diff --git a/polymer/eduke32/build/include/compat.h b/polymer/eduke32/build/include/compat.h index 9fd530d33..011539d71 100644 --- a/polymer/eduke32/build/include/compat.h +++ b/polymer/eduke32/build/include/compat.h @@ -159,6 +159,13 @@ static inline float nearbyintf(float x) } # endif #endif + +#include +static inline long lround(double num) +{ + return (long) (num > 0 ? num + 0.5 : ceil(num - 0.5)); +} + #else # define longlong(x) x##ll #endif