summaryrefslogtreecommitdiffstats
path: root/net/miax/patches/020-includes.patch
blob: ecba4250dd99b7e639b4adc3b9a0d82e28eac883 (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
--- a/dtmf.c
+++ b/dtmf.c
@@ -22,6 +22,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <math.h>
+#include <string.h>
 
 #define RATE 8000
 #define BLOCKLEN (RATE/100)
--- a/iax/iax.c
+++ b/iax/iax.c
@@ -343,7 +343,7 @@ static int iax_sched_event(struct iax_ev
 
 	sched = (struct iax_sched*)malloc(sizeof(struct iax_sched));
 	if (sched) {
-		bzero(sched, sizeof(struct iax_sched));
+		memset(sched, 0, sizeof(struct iax_sched));
 		gettimeofday(&sched->when, NULL);
 		sched->when.tv_sec += (ms / 1000);
 		ms = ms % 1000;
@@ -871,7 +871,7 @@ int iax_do_event(struct iax_session *ses
 
 #define MYSNPRINTF snprintf(requeststr + strlen(requeststr), sizeof(buf) - sizeof(struct ast_iax2_full_hdr) - strlen(requeststr), 
 
-	bzero(buf, sizeof(buf));
+	memset(buf, 0, sizeof(buf));
 
 	/* Default some things in the frame */
 
@@ -1522,7 +1522,7 @@ int iax_auth_reply(struct iax_session *s
 		MD5Update(&md5, (const unsigned char *) challenge, strlen(challenge));
 		MD5Update(&md5, (const unsigned char *) password, strlen(password));
 		MD5Final((unsigned char *) reply, &md5);
-		bzero(realreply, sizeof(realreply));
+		memset(realreply, 0, sizeof(realreply));
 		convert_reply(realreply, (unsigned char *) reply);
 		iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, realreply);
 	} else {
@@ -1545,7 +1545,7 @@ static int iax_regauth_reply(struct iax_
 		MD5Update(&md5, (const unsigned char *) challenge, strlen(challenge));
 		MD5Update(&md5, (const unsigned char *) password, strlen(password));
 		MD5Final((unsigned char *) reply, &md5);
-		bzero(realreply, sizeof(realreply));
+		memset(realreply, 0, sizeof(realreply));
 		convert_reply(realreply, (unsigned char *) reply);
 		iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, realreply);
 	} else {
--- a/modem.c
+++ b/modem.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
-#include <unistd.h>
+#include <time.h>
 
 static int baudrate=B9600, fd_modem, m_status=0;
 extern int debug;
@@ -50,7 +50,7 @@ int tty_modem_init(char *dev) {
 	char buf[4096];
 	struct termios newtio;
   
-	bzero(&newtio, sizeof(newtio));
+	memset(&newtio, 0, sizeof(newtio));
 	newtio.c_cflag = CRTSCTS | CS8 | CLOCAL | CREAD | O_NDELAY;
 	if ( fd_modem = open(dev, O_RDWR | O_NOCTTY | O_NONBLOCK) ) {
 		cfsetispeed(&newtio,baudrate);
--- a/oss.c
+++ b/oss.c
@@ -1,5 +1,8 @@
 #include "iaxclient_lib.h"
 #include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
 #include <sys/soundcard.h>
 
 #define RTP 320