ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/utils/smstools3/patches/002-Makefile.patch b/external/subpack/utils/smstools3/patches/002-Makefile.patch
new file mode 100644
index 0000000..a52aee4
--- /dev/null
+++ b/external/subpack/utils/smstools3/patches/002-Makefile.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,7 +1,7 @@
+ # In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf).
+
+ # Select your setup size:
+-CFLAGS = -D NUMBER_OF_MODEMS=64
++CFLAGS ?= -D NUMBER_OF_MODEMS=64
+
+ # Uncomment for Solaris
+ # CFLAGS += -D SOLARIS
diff --git a/external/subpack/utils/smstools3/patches/003-bash-ash.patch b/external/subpack/utils/smstools3/patches/003-bash-ash.patch
new file mode 100644
index 0000000..4ad1663
--- /dev/null
+++ b/external/subpack/utils/smstools3/patches/003-bash-ash.patch
@@ -0,0 +1,8 @@
+--- a/scripts/sendsms
++++ b/scripts/sendsms
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/ash
+ # This script send a text sms at the command line by creating
+ # a sms file in the outgoing queue.
+
diff --git a/external/subpack/utils/smstools3/patches/004-modem-processes.patch b/external/subpack/utils/smstools3/patches/004-modem-processes.patch
new file mode 100644
index 0000000..8f0f446
--- /dev/null
+++ b/external/subpack/utils/smstools3/patches/004-modem-processes.patch
@@ -0,0 +1,24 @@
+commit 3790bd05ed86b1692719df22857ef76c1293b01c
+Author: Harald Geyer <harald@ccbib.org>
+Date: Sun Feb 18 19:24:48 2018 +0100
+
+ Make modem processes terminate when main process dies
+
+--- a/src/smsd.c
++++ b/src/smsd.c
+@@ -34,6 +34,7 @@ Either version 2 of the License, or (at
+ #ifndef DISABLE_INOTIFY
+ #include <sys/inotify.h>
+ #endif
++#include <sys/prctl.h>
+
+ #include "extras.h"
+ #include "locking.h"
+@@ -8100,6 +8101,7 @@ int main(int argc,char** argv)
+
+ if (pid == 0)
+ {
++ prctl(PR_SET_PDEATHSIG, SIGTERM, 0, 0, 0);
+ process_id = i;
+ strcpy(process_title, DEVICE.name);
+ apply_process_name(argc, argv, process_title);