Subject: pkg/33893: security/tct does not build on Linux
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 07/01/2006 19:05:01
>Number:         33893
>Category:       pkg
>Synopsis:       security/tct does not build on Linux
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 01 19:05:00 +0000 2006
>Originator:     Sergey Svishchev
Linux 2.4.21-37.0.1.EL i686

build fails on Red Hat Enterprise Linux 3:

gcc -O -g -DLINUX2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DMAGIC="\"`cd ../../etc; pwd`/magic\"" -o ../../bin/file file.o apprentice.o fsmagic.o softmagic.o ascmagic.o  compress.o is_tar.o  print.o international.o
file.o(.text+0x232): In function `unwrap':
/var/obj/security/tct/work/tct-1.09/src/file/file.c:184: undefined reference to `errno'
file.o(.text+0x354): In function `process':
/var/obj/security/tct/work/tct-1.09/src/file/file.c:223: undefined reference to `errno'
file.o(.text+0x428):/var/obj/security/tct/work/tct-1.09/src/file/file.c:247: undefined reference to `errno'
file.o(.text+0x474):/var/obj/security/tct/work/tct-1.09/src/file/file.c:258: undefined reference to `errno'
file.o(.text+0x56f):/var/obj/security/tct/work/tct-1.09/src/file/file.c:300: undefined reference to `errno'
file.o(.text+0x5bc):/var/obj/security/tct/work/tct-1.09/src/file/file.c:304: more undefined references to `errno' follow
collect2: ld returned 1 exit status
*** Error code 1



--- src/file/file.c.orig	2000-07-30 23:39:20.000000000 +0000
+++ src/file/file.c
@@ -32,6 +32,7 @@ static char *moduleid =
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/errno.h>
 #include <sys/types.h>
 #include <sys/param.h>	/* for MAXPATHLEN */
 #include <sys/stat.h>
--- src/file/fsmagic.c.orig	2000-07-30 23:39:20.000000000 +0000
+++ src/file/fsmagic.c
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <string.h>
+#include <sys/errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
--- src/file/compress.c.orig	2000-07-30 23:39:20.000000000 +0000
+++ src/file/compress.c
@@ -10,6 +10,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <sys/errno.h>
 #include <sys/wait.h>
 #include "file.h"