From b2cca974c1cb6b42e21aef0d4f4990bb57e6a8bf Mon Sep 17 00:00:00 2001
From: Steve Underwood <steveu@coppice.org>
Date: Sat, 8 Feb 2014 22:36:29 +0800
Subject: [PATCH] Second attempt to fix the use of aligned_alloc with BSD

---
 libs/spandsp/src/alloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libs/spandsp/src/alloc.c b/libs/spandsp/src/alloc.c
index 3abe086c3c..273fad30d0 100644
--- a/libs/spandsp/src/alloc.c
+++ b/libs/spandsp/src/alloc.c
@@ -36,10 +36,11 @@
 #if !defined(__USE_ISOC11)
 #define __USE_ISOC11
 #endif
-#include <stdlib.h>
 #if defined(__ISO_C_VISIBLE)  &&  __ISO_C_VISIBLE < 2011
+#undef __ISO_C_VISIBLE
 #define __ISO_C_VISIBLE 2011
 #endif
+#include <stdlib.h>
 #if defined(HAVE_MALLOC_H)
 #include <malloc.h>
 #endif