Package: socks4-server
Severity: normal
Tags: patch
When building 'socks4-server' on amd64 with gcc-4.0,
I get the following error:
main.c:500: warning: incompatible implicit declaration of built-in function
'strlen'
gcc -I../include -g -DLINUX -DCOMPAT -Dconnect=Rconnect
-Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Dbind=Rbind
-Dselect=Rselect -Dgethostbyname=Rgethostbyname -c -o ruserpass.o ruserpass.c
In file included from ruserpass.c:44:
ftp_var.h: In function 'strerror':
ftp_var.h:154: warning: return discards qualifiers from pointer target type
ruserpass.c: At top level:
ruserpass.c:54: warning: conflicting types for built-in function 'malloc'
ruserpass.c: In function 'ruserpass':
ruserpass.c:90: error: invalid storage class for function 'token'
ruserpass.c:144: warning: incompatible implicit declaration of built-in
function 'strlen'
ruserpass.c:160: warning: incompatible implicit declaration of built-in
function 'strlen'
ruserpass.c:172: warning: incompatible implicit declaration of built-in
function 'strlen'
ruserpass.c: At top level:
ruserpass.c:251: error: static declaration of 'token' follows non-static
declaration
ruserpass.c:107: error: previous implicit declaration of 'token' was here
make[2]: *** [ruserpass.o] Error 1
make[2]: Leaving directory `/socks4-server-4.3.beta2/rftp'
With the attached patch 'socks4-server' can be compiled
on amd64 using gcc-4.0.
The attached patch includes a patch which was already necessary for
gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rftp/ruserpass.c
./rftp/ruserpass.c
--- ../tmp-orig/socks4-server-4.3.beta2/rftp/ruserpass.c 1994-07-05
21:47:09.000000000 +0200
+++ ./rftp/ruserpass.c 2005-02-09 14:08:53.634946994 +0100
@@ -80,6 +80,8 @@
0, 0
};
+static int token();
+
ruserpass(host, aname, apass, aacct)
char *host, **aname, **apass, **aacct;
{
@@ -87,7 +89,6 @@
char myname[MAXHOSTNAMELEN], *mydomain;
int t, i, c, usedefault = 0;
struct stat stb;
- static int token();
hdir = getenv("HOME");
if (hdir == NULL)
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rfinger/finger.c
./rfinger/finger.c
--- ../tmp-orig/socks4-server-4.3.beta2/rfinger/finger.c 2005-02-09
14:09:03.738993944 +0100
+++ ./rfinger/finger.c 2005-02-09 11:50:49.000000000 +0100
@@ -14,7 +14,6 @@
#include "socks.h"
#include <getopt.h>
-extern int errno;
extern char *strrchr();
char *Progname;
extern char *getenv();
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rftp/cmds.c ./rftp/cmds.c
--- ../tmp-orig/socks4-server-4.3.beta2/rftp/cmds.c 1996-01-03
03:35:51.000000000 +0100
+++ ./rftp/cmds.c 2005-02-09 11:50:49.000000000 +0100
@@ -80,7 +80,6 @@
extern char *index();
extern char *rindex();
extern char *strerror();
-extern int errno;
extern off_t restart_point;
extern char reply_string[];
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rftp/ftp.c ./rftp/ftp.c
--- ../tmp-orig/socks4-server-4.3.beta2/rftp/ftp.c 2005-02-09
14:09:03.739993751 +0100
+++ ./rftp/ftp.c 2005-02-09 11:50:49.000000000 +0100
@@ -95,7 +95,7 @@
int pasvmode = 0;
extern char *strerror();
-extern int connected, errno;
+extern int connected;
FILE *cin, *cout;
FILE *dataconn();
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rftp/ftp_var.h ./rftp/ftp_var.h
--- ../tmp-orig/socks4-server-4.3.beta2/rftp/ftp_var.h 2005-02-09
14:09:03.739993751 +0100
+++ ./rftp/ftp_var.h 2005-02-09 11:50:49.000000000 +0100
@@ -33,6 +33,8 @@
* @(#)ftp_var.h 5.9 (Berkeley) 6/1/90
*/
+#include <errno.h>
+
/*
* FTP global variables.
*/
@@ -136,12 +138,6 @@
extern char *index();
extern char *rindex();
extern char *remglob();
-extern int errno;
-extern char *mktemp();
-extern char *strncpy();
-extern char *strncat();
-extern char *strcat();
-extern char *strcpy();
#if defined (COMPAT) || defined (ultrix) || defined(SCO)
typedef void (*sig_t)();
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rftp/glob.c ./rftp/glob.c
--- ../tmp-orig/socks4-server-4.3.beta2/rftp/glob.c 2005-02-09
14:09:03.740993557 +0100
+++ ./rftp/glob.c 2005-02-09 11:50:49.000000000 +0100
@@ -82,7 +82,6 @@
char **ftpglob();
char *globerr;
char *home;
-extern int errno;
static char *strspl(), *strend();
char **copyblk();
diff -urN ../tmp-orig/socks4-server-4.3.beta2/rtelnet/telnet/externs.h
./rtelnet/telnet/externs.h
--- ../tmp-orig/socks4-server-4.3.beta2/rtelnet/telnet/externs.h
1996-06-11 19:47:52.000000000 +0200
+++ ./rtelnet/telnet/externs.h 2005-02-09 11:50:49.000000000 +0100
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <setjmp.h>
+#include <errno.h>
#ifndef FILIO_H
#include <sys/ioctl.h>
#else
@@ -73,8 +74,6 @@
#define SUBBUFSIZE 256
-extern int errno; /* outside this world */
-
#if !defined(P)
# ifdef __STDC__
# define P(x) x
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]