File transconnect-1.2.dif of Package transconnect
--- Makefile
+++ Makefile 2002/06/21 12:12:27
@@ -1,6 +1,6 @@
# Makefile for transconnect
-CFLAGS = -Wall
+CFLAGS = -Wall -fPIC
LDFLAGS = -shared
LINUX_LDLIBS = -ldl
--- tconn.c
+++ tconn.c
@@ -149,7 +149,7 @@
struct passwd *pwent; /* Needed for reading the password file to extract home directory */
int optval; /* Options for socket */
- int optlen;
+ socklen_t optlen;
#ifdef _BSD_HACK_
static void *handle; /* On BSD we can't use RTLD_NEXT. So we need a handle to libc */
@@ -197,7 +197,7 @@ int connect (int sockfd, const struct so
{
/* use config file name from environment variable */
strncpy (configfile, tconn_env, CONFIG_FILE_MAX);
- configfile[CONFIG_FILE_MAX] = '\0';
+ configfile[CONFIG_FILE_MAX-1] = '\0';
}
else
{
@@ -215,7 +215,7 @@ int connect (int sockfd, const struct so
strncat (configfile, CONFIG_FILE_DEFAULT,
(sizeof(CONFIG_FILE_DEFAULT) + 1));
- configfile[CONFIG_FILE_MAX] = '\0';
+ configfile[CONFIG_FILE_MAX-1] = '\0';
}
else
{