diff --git a/contrib/src/gsm/include_ios.patch b/contrib/src/gsm/include_ios.patch
new file mode 100644
index 0000000000000000000000000000000000000000..80db687204ee1bcd48f08374e63a5b7214420355
--- /dev/null
+++ b/contrib/src/gsm/include_ios.patch
@@ -0,0 +1,11 @@
+--- a/src/code.c	2016-06-13 10:49:31.000000000 -0400
++++ b/src/code.c	2016-06-13 10:49:22.000000000 -0400
+@@ -16,6 +16,8 @@
+ 	extern char	* memcpy P((char *, char *, int));
+ #endif
+
++#include <string.h>
++
+ #include	"private.h"
+ #include	"gsm.h"
+ #include	"proto.h"
diff --git a/contrib/src/gsm/rules.mak b/contrib/src/gsm/rules.mak
index 2ca2b440f27d17c7724d25b0e3735679d28f3e43..c080287653ecea8f1825e3ab453e5c69cb24f62c 100644
--- a/contrib/src/gsm/rules.mak
+++ b/contrib/src/gsm/rules.mak
@@ -12,6 +12,7 @@ $(TARBALLS)/libgsm_$(GSM_VERSION).tar.gz:
 gsm: libgsm_$(GSM_VERSION).tar.gz .sum-gsm
 	$(UNPACK)
 	mv gsm-1.0-* libgsm_$(GSM_VERSION)
+	$(APPLY) $(SRC)/gsm/include_ios.patch
 	$(APPLY) $(SRC)/gsm/gsm-cross.patch
 	sed -e 's/^CFLAGS.*=/CFLAGS+=/' -i.orig libgsm_$(GSM_VERSION)/Makefile
 	$(MOVE)