From 22c5fe4ae5640b1f2e7358dccbc720faa84616a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 10 Mar 2007 15:06:06 +0000 Subject: [PATCH] Partial Win32 compile fix --- libs/srtp/srtp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libs/srtp/srtp.c b/libs/srtp/srtp.c index bbe1b404ef..bb6fd5ebf4 100644 --- a/libs/srtp/srtp.c +++ b/libs/srtp/srtp.c @@ -33,9 +33,6 @@ #include -#include -#include - /* TODO: * Useful stuff: * - ROC profil thingy (multicast really needs this) @@ -79,7 +76,11 @@ enum SRTCP_SALT }; -#ifndef WIN32 +#ifdef WIN32 +# include +#else +# include +# include GCRY_THREAD_OPTION_PTHREAD_IMPL; #endif @@ -465,7 +466,7 @@ static int srtp_encrypt (srtp_session_t *s, uint8_t *buf, size_t len) * * @return 0 on success, in case of error: * EINVAL malformatted RTP packet - * ENOBUFS bufsize is too small + * ENOSPC bufsize is too small (to add authentication tag) */ int srtp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t bufsize) @@ -476,7 +477,7 @@ srtp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t bufsize) return val; if (bufsize < (len + s->rtp.mac_len)) - return ENOBUFS; + return ENOSPC; /* FIXME: HMAC and anti-replay */ return 0; -- 2.39.2