ソースを参照

- small sun fixes

Andrei Pelinescu-Onciul 24 年 前
コミット
a46cdb8cef
2 ファイル変更5 行追加2 行削除
  1. 3 1
      action.c
  2. 2 1
      udp_server.h

+ 3 - 1
action.c

@@ -13,6 +13,8 @@
 #include "udp_server.h"
 #include "route.h"
 
+#include <sys/types.h>
+#include <sys/socket.h>
 #include <netdb.h>
 #include <stdlib.h>
 
@@ -41,7 +43,7 @@ int do_action(struct action* a, struct sip_msg* msg)
 			if (ret>=0) ret=1;
 			break;
 		case SEND_T:
-			to=(struct sockaddr_in*) malloc(sizeof(struct sockaddr));
+			to=(struct sockaddr_in*) malloc(sizeof(struct sockaddr_in));
 			if (to==0){
 				LOG(L_ERR, "ERROR: do_action: "
 							"memory allocation failure\n");

+ 2 - 1
udp_server.h

@@ -5,7 +5,8 @@
 #ifndef udp_server_h
 #define udp_server_h
 
-
+#include <sys/types.h>
+#include <sys/socket.h>
 
 extern int udp_sock;