diff --git a/contrib/scripts/get_mp3_source.sh b/contrib/scripts/get_mp3_source.sh index e1ee13bbdd..860e2bc02f 100755 --- a/contrib/scripts/get_mp3_source.sh +++ b/contrib/scripts/get_mp3_source.sh @@ -17,8 +17,10 @@ fi svn export http://svn.digium.com/svn/thirdparty/mp3/trunk addons/mp3 $@ -# Manually patch interface.c. -sed -i -e '/#include "asterisk.h"/i#define WRAP_LIBC_MALLOC' \ - addons/mp3/interface.c +# Manually patch interface.c if not done yet. +if ! grep -q WRAP_LIBC_MALLOC addons/mp3/interface.c; then + sed -i -e '/#include "asterisk.h"/i#define WRAP_LIBC_MALLOC' \ + addons/mp3/interface.c +fi exit 0