Commit 71c27d6b authored by jehan's avatar jehan

fix compilation issue on macosx

parent 7342c7d0
...@@ -9,8 +9,8 @@ AC_CONFIG_SRCDIR([src/bzrtp.c]) ...@@ -9,8 +9,8 @@ AC_CONFIG_SRCDIR([src/bzrtp.c])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([tar-ustar --warnings=no-portability]) AM_INIT_AUTOMAKE([tar-ustar --warnings=no-portability])
AC_PROG_CC(["xcrun clang" gcc])
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_PROG_CC
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_ARG_ENABLE(strict, AC_ARG_ENABLE(strict,
...@@ -78,6 +78,12 @@ AM_CONDITIONAL(ENABLE_TESTS, test x$tests_enabled = xyes && test x$found_cunit = ...@@ -78,6 +78,12 @@ AM_CONDITIONAL(ENABLE_TESTS, test x$tests_enabled = xyes && test x$found_cunit =
CFLAGS="$CFLAGS -Wall -std=c99" CFLAGS="$CFLAGS -Wall -std=c99"
case $CC in
*clang*)
CFLAGS="$CFLAGS -Qunused-arguments"
;;
esac
if test $GCC = yes && test $wall_werror = yes; then if test $GCC = yes && test $wall_werror = yes; then
CFLAGS="$CFLAGS -Werror " CFLAGS="$CFLAGS -Werror "
fi fi
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*/ */
#ifndef BZRTP_H #ifndef BZRTP_H
#define BZRTP_H #define BZRTP_H
typedef struct bzrtpContext_struct bzrtpContext_t;
#include <stdint.h> #include <stdint.h>
/** /**
......
...@@ -117,7 +117,7 @@ typedef struct zrtpCallbacks_struct { ...@@ -117,7 +117,7 @@ typedef struct zrtpCallbacks_struct {
* @brief The zrtp context of a channel * @brief The zrtp context of a channel
* *
*/ */
typedef struct bzrtpChannelContext_struct { struct bzrtpChannelContext_struct {
void *clientData; /**< this is a pointer provided by the client which is then resent as a parameter of the callbacks functions. Usefull to store RTP session context for example */ void *clientData; /**< this is a pointer provided by the client which is then resent as a parameter of the callbacks functions. Usefull to store RTP session context for example */
...@@ -177,13 +177,13 @@ typedef struct bzrtpChannelContext_struct { ...@@ -177,13 +177,13 @@ typedef struct bzrtpChannelContext_struct {
/* temporary buffer stored in the channel context */ /* temporary buffer stored in the channel context */
bzrtpPacket_t *pingPacket; /**< Temporary stores a ping packet when received to be used to create the pingACK response */ bzrtpPacket_t *pingPacket; /**< Temporary stores a ping packet when received to be used to create the pingACK response */
} bzrtpChannelContext_t; };
/** /**
* @brief structure of the ZRTP engine context * @brief structure of the ZRTP engine context
* Store current state, timers, HMAC and encryption keys * Store current state, timers, HMAC and encryption keys
*/ */
typedef struct bzrtpContext_struct { struct bzrtpContext_struct {
/* contexts */ /* contexts */
bzrtpRNGContext_t *RNGContext; /**< context for random number generation */ bzrtpRNGContext_t *RNGContext; /**< context for random number generation */
bzrtpDHMContext_t *DHMContext; /**< context for the Diffie-Hellman-Merkle operations. Only one DHM computation may be done during a call, so this belongs to the general context and not the channel one */ bzrtpDHMContext_t *DHMContext; /**< context for the Diffie-Hellman-Merkle operations. Only one DHM computation may be done during a call, so this belongs to the general context and not the channel one */
...@@ -225,7 +225,7 @@ typedef struct bzrtpContext_struct { ...@@ -225,7 +225,7 @@ typedef struct bzrtpContext_struct {
uint8_t *ZRTPSess; /**< ZRTP session key as described in rfc section 4.5.2 */ uint8_t *ZRTPSess; /**< ZRTP session key as described in rfc section 4.5.2 */
uint8_t ZRTPSessLength; /**< length of ZRTP session key depends on agreed hash algorithm */ uint8_t ZRTPSessLength; /**< length of ZRTP session key depends on agreed hash algorithm */
} bzrtpContext_t; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment