summaryrefslogtreecommitdiffstats
path: root/net/miax/patches/030-Fix-implicit-declaration-warning.patch
blob: 0d59c3ea15b3218434b8093669510371829e8182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
From 4dec31e0f8fc5d838ac436dafce24630610d1a59 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Mon, 10 Nov 2025 01:56:00 +0100
Subject: [PATCH 1/2] Fix implicit declaration warning

Fix all implicit declaration warning in multiple source with a mix of
extern usage and introducing proper header file for functions where
possible.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 dtmf.c              |  1 +
 dtmf.h              |  6 ++++++
 iax/iax-client.h    |  1 +
 iax/iaxclient_lib.h |  4 ++++
 miax.c              |  1 +
 miax.h              |  5 +++++
 modem.c             |  1 +
 modem.h             |  9 +++++++++
 oss.c               |  2 ++
 oss.h               | 10 ++++++++++
 10 files changed, 40 insertions(+)
 create mode 100644 dtmf.h
 create mode 100644 modem.h
 create mode 100644 oss.h

--- a/dtmf.c
+++ b/dtmf.c
@@ -18,6 +18,7 @@
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
 
+#include "dtmf.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
--- /dev/null
+++ b/dtmf.h
@@ -0,0 +1,6 @@
+#ifndef _dtmf_h
+#define _dtmf_h
+
+int dtmf(short *buf);
+
+#endif
--- a/iax/iax-client.h
+++ b/iax/iax-client.h
@@ -130,6 +130,7 @@ extern int iax_send_voice(struct iax_ses
 extern int iax_send_image(struct iax_session *session, int format, char *data, int datalen);
 extern int iax_send_url(struct iax_session *session, char *url, int link);
 extern int iax_send_text(struct iax_session *session, char *text);
+extern int iax_send_ping(struct iax_session *session);
 extern int iax_load_complete(struct iax_session *session);
 extern int iax_reject(struct iax_session *session, char *reason);
 extern int iax_busy(struct iax_session *session);
--- a/iax/iaxclient_lib.h
+++ b/iax/iaxclient_lib.h
@@ -255,5 +255,9 @@ extern double iaxc_silence_threshold;
 extern iaxc_event_callback_t iaxc_event_callback;
 extern MUTEX iaxc_lock;
 
+extern int audio_in(struct iaxc_call *call);
+extern int audio_out(struct iaxc_call *call, void *encoded);
+extern int miax_callback(struct iax_event *event, int callNo);
+
 #endif
 
--- a/miax.c
+++ b/miax.c
@@ -18,6 +18,7 @@
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
 
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/miax.h
+++ b/miax.h
@@ -1,6 +1,9 @@
 #ifndef _miax_h
 #define _miax_h
 
+#include "modem.h"
+#include "oss.h"
+
 /*
 * Miax
 *
@@ -27,6 +30,8 @@ int	bt; //bluetooth
 int	m=0; //modem
 char	number[1024];
 
+int console_loop(int status, char *number);
+
 int audio_init(char *dev, int compression) {
 	oss_audio_init(dev, compression);
 	}
--- a/modem.c
+++ b/modem.c
@@ -19,6 +19,7 @@
 */
                   
 
+#include "modem.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
--- /dev/null
+++ b/modem.h
@@ -0,0 +1,9 @@
+#ifndef _modem_h
+#define _modem_h
+
+int tty_modem_close();
+int tty_modem_init(char *dev);
+int tty_modem(char* send, char *receive);
+int tty_modem_loop(int status, char *number);
+
+#endif
--- a/oss.c
+++ b/oss.c
@@ -1,4 +1,6 @@
+#include "dtmf.h"
 #include "iaxclient_lib.h"
+#include "oss.h"
 #include <fcntl.h>
 #include <string.h>
 #include <unistd.h>
--- /dev/null
+++ b/oss.h
@@ -0,0 +1,10 @@
+#ifndef _oss_h
+#define _oss_h
+
+int oss_audio_in(struct iaxc_call *call);
+int oss_audio_out(struct iaxc_call *call, void *encoded);
+int oss_audio_close();
+int oss_audio_open();
+int oss_audio_init(char *dev, int enc);
+
+#endif