diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h b/src/3rdparty/libtiff/libtiff/tif_config.h
index d60bd8e8a6e2aa52c43ceef3f4195fbac3db8536..64ab64ba3b56b134d5b440d9ece1998e4c32ef76 100644
--- a/src/3rdparty/libtiff/libtiff/tif_config.h
+++ b/src/3rdparty/libtiff/libtiff/tif_config.h
@@ -412,9 +412,12 @@
 
 /* Define to `__inline__' or `__inline' if that's what the C compiler
    calls it, or to nothing if 'inline' is not supported under any name.  */
+#if defined(Q_CC_MSVC)
 #ifndef __cplusplus
-#undef inline
-#define inline
+# ifndef inline
+#  define inline __inline
+# endif
+#endif
 #endif
 
 /* Define to `long int' if <sys/types.h> does not define. */