Mesa (master): mesa: Undefine ALIGN macro before it is used as a function name. Issues on MacOS.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 11 09:46:23 UTC 2020


Module: Mesa
Branch: master
Commit: 40e3eb9be96ec69259a000d08fe4a853a330007f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=40e3eb9be96ec69259a000d08fe4a853a330007f

Author: Duncan Hopkins <duncan.hopkins at foundry.com>
Date:   Wed Aug 26 17:39:56 2020 +0100

mesa: Undefine ALIGN macro before it is used as a function name. Issues on MacOS.

Acked-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7469>

---

 src/util/u_math.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/u_math.h b/src/util/u_math.h
index b725489b520..2b12267b961 100644
--- a/src/util/u_math.h
+++ b/src/util/u_math.h
@@ -691,6 +691,10 @@ util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t
  *
  * \sa ROUND_DOWN_TO()
  */
+
+#if defined(ALIGN)
+#undef ALIGN
+#endif
 static inline uintptr_t
 ALIGN(uintptr_t value, int32_t alignment)
 {



More information about the mesa-commit mailing list