[FFmpeg-cvslog] lavf/tls_gnutls: fix warnings from version check

Moritz Barsnick git at videolan.org
Tue Sep 26 16:07:04 EEST 2017


ffmpeg | branch: master | Moritz Barsnick <barsnick at gmx.net> | Tue Sep 26 13:25:54 2017 +0200| [6bf48c4805cbb9754aa5a7bcb5f46df6bda95447] | committer: Carl Eugen Hoyos

lavf/tls_gnutls: fix warnings from version check

The GnuTLS version is checked through the macro GNUTLS_VERSION_NUMBER,
but this wasn't introduced before 2.7.2. Building with older versions
of GnuTLS (using icc) warns:

src/libavformat/tls_gnutls.c(38): warning #193: zero used for undefined preprocessing identifier "GNUTLS_VERSION_NUMBER"
  #if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00

This adds a fallback to the older, deprecated LIBGNUTLS_VERSION_NUMBER
macro.

Signed-off-by: Moritz Barsnick <barsnick at gmx.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6bf48c4805cbb9754aa5a7bcb5f46df6bda95447
---

 libavformat/tls_gnutls.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 7174dfd3fc..5ce6c3d448 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -35,6 +35,10 @@
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
 
+#ifndef GNUTLS_VERSION_NUMBER
+#define GNUTLS_VERSION_NUMBER LIBGNUTLS_VERSION_NUMBER
+#endif
+
 #if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00
 #include <gcrypt.h>
 #include "libavutil/thread.h"



More information about the ffmpeg-cvslog mailing list