From a1447b036cb3027d9d268db482451f788f53806c Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 20 Feb 2019 17:51:40 +0530 Subject: [PATCH] gstmacros.h: Fix restrict definition on MSVC Turns out it's exposed as `__restrict`, not as `restrict`. https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/95#note_120782 --- gst/gstmacros.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/gstmacros.h b/gst/gstmacros.h index 5c0815e713..b3313e4e37 100644 --- a/gst/gstmacros.h +++ b/gst/gstmacros.h @@ -42,9 +42,11 @@ G_BEGIN_DECLS #endif /* MSVC defines 'restrict' as a keyword and not a define */ -#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(_MSC_VER) && !defined(restrict) +#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(restrict) # if defined(__GNUC__) && __GNUC__ >= 4 # define restrict __restrict__ +# elif defined(_MSC_VER) +# define restrict __restrict # else # define restrict # endif