Browse code

- small sun fixes

Andrei Pelinescu-Onciul authored on 21/09/2001 20:35:51
Showing 2 changed files
... ...
@@ -13,6 +13,8 @@
13 13
 #include "udp_server.h"
14 14
 #include "route.h"
15 15
 
16
+#include <sys/types.h>
17
+#include <sys/socket.h>
16 18
 #include <netdb.h>
17 19
 #include <stdlib.h>
18 20
 
... ...
@@ -41,7 +43,7 @@ int do_action(struct action* a, struct sip_msg* msg)
41 41
 			if (ret>=0) ret=1;
42 42
 			break;
43 43
 		case SEND_T:
44
-			to=(struct sockaddr_in*) malloc(sizeof(struct sockaddr));
44
+			to=(struct sockaddr_in*) malloc(sizeof(struct sockaddr_in));
45 45
 			if (to==0){
46 46
 				LOG(L_ERR, "ERROR: do_action: "
47 47
 							"memory allocation failure\n");
... ...
@@ -5,7 +5,8 @@
5 5
 #ifndef udp_server_h
6 6
 #define udp_server_h
7 7
 
8
-
8
+#include <sys/types.h>
9
+#include <sys/socket.h>
9 10
 
10 11
 extern int udp_sock;
11 12