diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2017-07-13 22:14:37 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-07-13 22:15:16 +0200
commit1307b7aa606b31a54d6abbb3cf39c07ccf4d2cd0 (patch)
parentff8eed24e769800c1f7e946d64a3247cb1d4a9ae (diff)
configure.ac: Fix RTP_SIGNAL_PTR_CAST config in FreeBSD build
Move function definition to the first argument of AC_LANG_PROGRAM (prologue) instead of the second (body). Content of the body is writen into the main() function of the file being compiled, while prologue is writen before it. Compiler from FreeBSD build host doesn't like definitions inside the main function, it fails with the following error: conftest.c:28:73: error: function definition is not allowed here As the compilation test fails, unsigned int is used instead of void*, which doesn't match the current headers in the current build, and then a warning (or error with -Werror) is printed. Change-Id: I83fc3997e5067b499bf43cea4ff953604d6cbeae
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9b62f3e..0686f64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,8 +79,9 @@ _cflags_save=$CFLAGS
- [[#include <ortp/ortp.h>]],
- [[void fake_cb(struct _RtpSession *r, void *arg1, void *arg2, void *arg3) { return; } rtp_session_signal_connect(NULL, "", fake_cb, (void*) fake_cb);]]
+ [[#include <ortp/ortp.h>
+ void fake_cb(struct _RtpSession *r, void *arg1, void *arg2, void *arg3) { return; }]],
+ [[rtp_session_signal_connect(NULL, "", fake_cb, (void*) fake_cb);]]
[AC_DEFINE([RTP_SIGNAL_PTR_CAST(arg)], [(void*)(arg)],
[rtp_session_signal_connect requires pointer parameter])],