Subject: Error on Compilation of Beta18-vr5

From: "Auteria Wally Winzer Jr." <[email-masked]>
Date: Sat, 15 Aug 1998 23:51:44 -0700

The following error occured while compiling beta18-vr5.
The platform is Solaris-2.5.1 (fully-patched) running on a E3000:

gcc -g -O3 -I.. -I../support -L../support  -c  ftpd.c
ftpd.c: In function `do_daemon':
ftpd.c:4712: storage size of `rlp' isn't known
ftpd.c:4714: `RLIM_INFINITY' undeclared (first use in this function)
ftpd.c:4714: (Each undeclared identifier is reported only once
ftpd.c:4714: for each function it appears in.)
ftpd.c:4715: `RLIMIT_NOFILE' undeclared (first use in this function)
*** Error code 1
make: Fatal error: Command failed for target `ftpd.o'

The remaining executables compiled with no errors.

Thanks for the valuable help.

- Wally Winzer Jr.

---

From: Gregory A Lundberg <[email-masked]>
Date: Sun, 16 Aug 1998 11:26:18 -0400 (EDT)

> make: Fatal error: Command failed for target `ftpd.o'

Reading the code I see this this is from HAVE_GETRLIMIT being defined
which is used in popen.c so it's been arround for a long time.  The code
in ftpd.c was copied from popen.c to start up as a standalone daemon.

First, let's check that your system _thinks_ it should know this:

  man getrlimit
  man setrlimit
  su -c `find / -name resource.h`

Next, check that you're using a clean build:

  sh build clean
  sh build sol

If you're still getting the error, try disabling the standalone daemon
code.  In the top directory (not src), edit config.h (line 104) change

  #define DAEMON

to

  #undef DAEMON

and do a clean build again.  You won't be able to run as a standalone
daemon, but if it works ...

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Gregory A Lundberg <[email-masked]>
Date: Sun, 16 Aug 1998 12:49:04 -0400 (EDT)

> > ftpd.c:4715: `RLIMIT_NOFILE' undeclared (first use in this function)

Here's a patch to try.

*** src/ftpd.c.orig	Fri Aug 14 14:35:32 1998
--- src/ftpd.c	Sun Aug 16 12:48:17 1998
***************
*** 157,162 ****
--- 157,166 ----
  #include <sys/dir.h>
  #endif
  
+ #ifdef HAVE_GETRLIMIT
+ #include <sys/resource.h>
+ #endif
+ 
  #if (defined(_BSDI_VERSION) && (_BSDI_VERSION < 199501)) /* before version 2 */
  #define LONGOFF_T  /* sizeof(off_t) == sizeof(long) */
  #endif

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195
*** src/ftpd.c.orig	Fri Aug 14 14:35:32 1998
--- src/ftpd.c	Sun Aug 16 12:48:17 1998
***************
*** 157,162 ****
--- 157,166 ----
  #include <sys/dir.h>
  #endif
  
+ #ifdef HAVE_GETRLIMIT
+ #include <sys/resource.h>
+ #endif
+ 
  #if (defined(_BSDI_VERSION) && (_BSDI_VERSION < 199501)) /* before version 2 */
  #define LONGOFF_T  /* sizeof(off_t) == sizeof(long) */
  #endif