summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-02-20 01:25:11 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2019-02-20 01:25:11 +0530
commitea4b0861425d8e92e73164847d25f6381b39283a (patch)
tree618b6992f3ad7856d27dc5f5e049c931607faf20
parent790f193d632979b1fc0e7e851837b9f8f3a59d1a (diff)
gstmacros.h: Fix check for 'restrict' keyword
MSVC also defines it as a keyword. Fixes build errors in projects that include MSVC's xkeycheck.h which ensures that keywords aren't overriden with a define.
-rw-r--r--gst/gstmacros.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/gstmacros.h b/gst/gstmacros.h
index 53cf6cf69..5c0815e71 100644
--- a/gst/gstmacros.h
+++ b/gst/gstmacros.h
@@ -41,7 +41,8 @@ G_BEGIN_DECLS
# undef GST_CAN_INLINE
#endif
-#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(restrict)
+/* MSVC defines 'restrict' as a keyword and not a define */
+#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(_MSC_VER) && !defined(restrict)
# if defined(__GNUC__) && __GNUC__ >= 4
# define restrict __restrict__
# else