radv: don't pass null to _mesa_sha1_update
[mesa.git] / src / util / macros.h
index 04aec96b54667db9c9f8309e5618f6401dedbf5c..f9aa478c9949f52e2c75a2e04d7905a36a285c37 100644 (file)
@@ -351,4 +351,14 @@ enum pipe_debug_type
    PIPE_DEBUG_TYPE_CONFORMANCE,
 };
 
+#if !defined(alignof) && !defined(__cplusplus)
+#if __STDC_VERSION__ >= 201112L
+#define alignof(t) _Alignof(t)
+#elif defined(_MSC_VER)
+#define alignof(t) __alignof(t)
+#else
+#define alignof(t) __alignof__(t)
+#endif
+#endif
+
 #endif /* UTIL_MACROS_H */