<< | Thread Index | >> ]    [ << | Date Index | >> ]

To: <cipe-l,AT,inka,DOT,de>
Subject: Patch for compilation warnings 1.5.4
From: "Rusty Conover" <rconover,AT,infogears,DOT,com>
Date: Fri, 11 Jul 2003 15:26:01 -0600 (MDT)
Importance: Normal
Reply-to: rconover,AT,infogears,DOT,com

Hi everyone,

Below is a patch to resolve all build warnings building cipe-1.5.4 under
redhat 9.

Thanks,

Rusty
-- 
Rusty Conover
InfoGears Inc.
http://www.infogears.com

diff -ur cipe-1.5.4/cipe/ciped.c cipe-1.5.4-fixed/cipe/ciped.c
--- cipe-1.5.4/cipe/ciped.c     2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/cipe/ciped.c       2003-07-11 15:13:58.000000000 -0600
@@ -34,6 +34,7 @@
 #include <sys/wait.h>
 #include <values.h>
 #include <linux/if_ether.h>
+#include <time.h>
 #include "ciped.h"
 #include "ioctl.h"
 #include "cipelib.h"
diff -ur cipe-1.5.4/cipe/crcgen.c cipe-1.5.4-fixed/cipe/crcgen.c
--- cipe-1.5.4/cipe/crcgen.c    2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/cipe/crcgen.c      2003-07-11 15:13:16.000000000 -0600
@@ -12,8 +12,10 @@
 */
 /* $Id: crcgen.c,v 1.3 2000/03/12 00:10:14 olaf Exp $ */

+#include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>

 #define BUFS 4096

diff -ur cipe-1.5.4/cipe/ioctl.c cipe-1.5.4-fixed/cipe/ioctl.c
--- cipe-1.5.4/cipe/ioctl.c     2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/cipe/ioctl.c       2003-07-11 15:13:33.000000000 -0600
@@ -16,6 +16,7 @@
 #include "ioctl.h"
 #include "version.h"
 #include <sys/ioctl.h>
+#include <string.h>

 #define IFRSETUP                                                        \
     struct ifreq ifr;                                                   \
Only in cipe-1.5.4: cipe.info
Only in cipe-1.5.4: cipe.spec
diff -ur cipe-1.5.4/lib/dsprintf.c cipe-1.5.4-fixed/lib/dsprintf.c
--- cipe-1.5.4/lib/dsprintf.c   2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/lib/dsprintf.c     2003-07-11 15:11:46.000000000 -0600
@@ -10,6 +10,7 @@
 */
 /* $Id: dsprintf.c,v 1.1 2000/11/30 22:12:41 olaf Exp $ */

+#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include "cipelib.h"
diff -ur cipe-1.5.4/lib/socks5_open.c cipe-1.5.4-fixed/lib/socks5_open.c
--- cipe-1.5.4/lib/socks5_open.c        2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/lib/socks5_open.c  2003-07-11 15:13:03.000000000 -0600
@@ -14,6 +14,7 @@
 #include <unistd.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
+#include <string.h>
 #include "cipelib.h"
 #include "socks5_internal.h"

diff -ur cipe-1.5.4/pkcipe/main.c cipe-1.5.4-fixed/pkcipe/main.c
--- cipe-1.5.4/pkcipe/main.c    2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/pkcipe/main.c      2003-07-11 15:17:20.000000000 -0600
@@ -106,7 +106,7 @@
     }
     setsig(SIGALRM, tout);
     alarm(timeout);
-    if (connect(c, &sa, sizeof(sa))<0) {
+    if (connect(c, (struct sockaddr *)&sa, sizeof(sa))<0) {
        perror("connect");
        close(c);
        return 1;
@@ -138,7 +138,7 @@
     sa.sin_family=AF_INET;
     sa.sin_port=htons(p);
     sa.sin_addr.s_addr=htonl(INADDR_ANY);
-    if (bind(l, &sa, sizeof(sa))<0) {
+    if (bind(l, (struct sockaddr *)&sa, sizeof(sa))<0) {
        perror("bind");
        close(l);
        return 1;
@@ -152,7 +152,7 @@
     while (1) {
        e=sizeof(sa);
         alarm(0);
-       if ((c=accept(l, &sa, &e))<0) {
+       if ((c=accept(l, (struct sockaddr *)&sa, &e))<0) {
            if (errno!=EINTR)
                perror("accept");
            continue;
@@ -265,7 +265,7 @@
     } else {
        struct sockaddr_in sa;
        int ss=sizeof(sa);
-       if (getpeername(0, &sa, &ss)<0) {
+       if (getpeername(0, (struct sockaddr *)&sa, &ss)<0) {
            Log(LOG_ERR, "main: getsockname: %m");
            sa.sin_addr.s_addr=htonl(INADDR_ANY);
        }
diff -ur cipe-1.5.4/pkcipe/packet.c cipe-1.5.4-fixed/pkcipe/packet.c
--- cipe-1.5.4/pkcipe/packet.c  2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/pkcipe/packet.c    2003-07-11 15:17:38.000000000 -0600
@@ -15,6 +15,7 @@
 #include <alloca.h>
 #include <unistd.h>
 #include <sys/uio.h>
+#include <string.h>
 #include <openssl/evp.h>
 #include "pkcipe.h"

diff -ur cipe-1.5.4/pkcipe/proto.c cipe-1.5.4-fixed/pkcipe/proto.c
--- cipe-1.5.4/pkcipe/proto.c   2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/pkcipe/proto.c     2003-07-11 15:16:02.000000000 -0600
@@ -95,16 +95,16 @@
     }
     memset(&sb, 0, sizeof(sb));
     sb.sin_family=AF_INET;
-    if (bind(f, &sb, sizeof(sb))<0) {
+    if (bind(f, (struct sockaddr *)&sb, sizeof(sb))<0) {
        perror("getMySocket: bind");
     }
     sb.sin_port=htons(9);
     sb.sin_addr=connectAddr;
-    if (connect(f, &sb, sizeof(sb))<0) {
+    if (connect(f, (struct sockaddr *)&sb, sizeof(sb))<0) {
        perror("getMySocket: connect");
     }
     n=sizeof(*sa);
-    if (getsockname(f, sa, &n)<0) {
+    if (getsockname(f, (struct sockaddr *)sa, &n)<0) {
        perror("getMySocket: getsockname");
     }
     return f;
diff -ur cipe-1.5.4/pkcipe/p_sha1.c cipe-1.5.4-fixed/pkcipe/p_sha1.c
--- cipe-1.5.4/pkcipe/p_sha1.c  2003-07-11 15:19:38.000000000 -0600
+++ cipe-1.5.4-fixed/pkcipe/p_sha1.c    2003-07-11 15:17:53.000000000 -0600
@@ -14,6 +14,7 @@

 #include <sys/mman.h>
 #include <openssl/hmac.h>
+#include <string.h>
 #include "pkcipe.h"

 /* This is the P_SHA1 function as of RFC 2246, section 5.


<< | Thread Index | >> ]    [ << | Date Index | >> ]