Преглед на файлове

- warning & compile fixes for freebsd, openbsd, netbsd 64 & solaris 8

Andrei Pelinescu-Onciul преди 22 години
родител
ревизия
af6af90f37
променени са 3 файла, в които са добавени 8 реда и са изтрити 6 реда
  1. 4 2
      Makefile.defs
  2. 3 3
      msg_translator.c
  3. 1 1
      tcp_main.c

+ 4 - 2
Makefile.defs

@@ -632,7 +632,9 @@ ifeq  ($(OS), solaris)
 		#LDFLAGS=-g $(PROFILE)
 		#MOD_LDFLAGS=-g -G
 	endif
-
+ifneq ($(TLS),)
+	DEFS+= -I/usr/local/ssl/include
+endif
 	YACC=yacc
 
 ifeq ($(CC_NAME), suncc)
@@ -688,7 +690,7 @@ endif
 
 #add libssl if needed
 ifneq ($(TLS),)
-LIBS+= -lssl 
+LIBS+= -L/usr/local/lib -L/usr/local/ssl/lib -lssl  -lcrypto
 endif
 
 ifneq ($(found_lock_method), yes)

+ 3 - 3
msg_translator.c

@@ -1175,7 +1175,7 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
 			goto error01; /* free everything */
 		}
 		DBG("build_req_from_req: id added: <%.*s>, rcv proto=%d\n",
-				id_len, id_buf, msg->rcv.proto);
+				(int)id_len, id_buf, msg->rcv.proto);
 		extra_params.s=id_buf;
 		extra_params.len=id_len;
 	}
@@ -1185,8 +1185,8 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
 			|| proto==PROTO_TLS
 #endif
 			){
-		DBG("build_req_from_req: checking for clen; proto=%d, rcv->proto=%d\n",
-				proto, msg->rcv.proto);
+		DBG("build_req_from_req: checking for clen; proto=%d,"
+			" rcv->proto=%d\n", proto, msg->rcv.proto);
 		/* first of all parse content-length */
 		if (parse_headers(msg, HDR_CONTENTLENGTH, 0)==-1){
 			LOG(L_ERR, "build_req_buf_from_sip_req:"

+ 1 - 1
tcp_main.c

@@ -678,7 +678,7 @@ static inline void handle_new_connect(struct socket_info* si,
 		/* got a connection on r */
 		su_len=sizeof(su);
 		new_sock=accept(si->socket, &(su.s), &su_len);
-		*n--;
+		(*n)--;
 		if (new_sock<0){
 			LOG(L_ERR,  "WARNING: tcp_main_loop: error while accepting"
 					" connection(%d): %s\n", errno, strerror(errno));