Add _GNU_SOURCE to find pthread_mutexattr_init and display gcc version during build

This commit is contained in:
Ian Craggs 2013-11-13 15:47:34 +00:00
parent 0a385f482b
commit f7f9aeb422
3 changed files with 8 additions and 1 deletions

View File

@ -54,6 +54,11 @@
<property name="ldflags.so" value="-fvisibility=hidden -shared" />
<mkdir dir="${output.folder}"/>
<!-- display gcc version -->
<exec executable="gcc" failonerror="true">
<arg line="-v"/>
</exec>
<!-- non-SSL, synchronous library -->
<property name="output.filename" value="${output.folder}/lib${libname}.so" />
<exec executable="gcc" failonerror="true">

View File

@ -25,7 +25,7 @@
*
*/
#define _GNU_SOURCE
#define _GNU_SOURCE /* for pthread_mutexattr_settype */
#include <stdlib.h>
#if !defined(WIN32)
#include <sys/time.h>

View File

@ -18,6 +18,7 @@
* Ian Craggs - multiple server connection support
* Ian Craggs - fix for bug 413429 - connectionLost not called
* Ian Craggs - fix for bug 421103 - trying to write to same socket, in publish/retries
* Ian Craggs - fix for bug 419233 - mutexes not reporting errors
*******************************************************************************/
/**
@ -26,6 +27,7 @@
*
*/
#define _GNU_SOURCE /* for pthread_mutexattr_settype */
#include <stdlib.h>
#if !defined(WIN32)
#include <sys/time.h>