xfree86: common: include math.h unconditionally

The header exists on all supported platform, maybe some might still need
to define _XOPEN_SOURCE to get pow() defined.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-05-15 19:14:46 +02:00 committed by Marge Bot
parent fd6fe36622
commit 0a0731721f

View File

@ -29,18 +29,12 @@
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#if defined(_XOPEN_SOURCE) || defined(__sun) && defined(__SVR4)
#include <math.h> #include <math.h>
#else
#define _XOPEN_SOURCE /* to get prototype for pow on some systems */
#include <math.h>
#undef _XOPEN_SOURCE
#endif
#include <X11/X.h> #include <X11/X.h>
#include "misc.h"
#include <X11/Xproto.h> #include <X11/Xproto.h>
#include "misc.h"
#include "dix/colormap_priv.h" #include "dix/colormap_priv.h"
#include "colormapst.h" #include "colormapst.h"
#include "scrnintstr.h" #include "scrnintstr.h"