[BusyBox] telnetd does not compile!
Vladimir N. Oleynik
dzo at simtreas.ru
Mon Feb 10 09:10:03 UTC 2003
Steven,
> CONFIG_TELNETD does not compile with CONFIG_FEATURE_TELNETD_INETD (at least on
> my machine) !
>
> networking/telnetd.c: In function `telnetd_main':
> networking/telnetd.c:508: parse error before `int'
> networking/telnetd.c:520: `w' undeclared (first use in this function)
> networking/telnetd.c:520: (Each undeclared identifier is reported only once
> networking/telnetd.c:520: for each function it appears in.)
> networking/telnetd.c:542: `maxlen' undeclared (first use in this function)
> networking/telnetd.c:570: `r' undeclared (first use in this function)
>
> Please consider my attached suggestion.
>
> However, thanks for the good work, Vladimir!!!
I think to refuse support of the telnetd applet. :(
I only have corrected some moments and
persistently offered to include the utility in the bb project.
> And BTW please fix compiler warning in networking/inetd.c:
>
> diff -u -r1.1.1.1 inetd.c
> --- networking/inetd.c 9 Feb 2003 06:51:14 -0000 1.1.1.1
> +++ networking/inetd.c 10 Feb 2003 12:57:46 -0000
> @@ -536,7 +536,7 @@
> rl.rlim_cur = MIN(rl.rlim_max, rl.rlim_cur + FD_CHUNK);
> if (rl.rlim_cur <= rlim_ofile_cur) {
> syslog(LOG_ERR,
> - "bump_nofile: cannot extend file limit, max = %d",
> + "bump_nofile: cannot extend file limit, max = %ld",
> rl.rlim_cur);
> return -1;
Oh.
My man setrlimit(2) have:
The rlimit structure is defined as follows :
struct rlimit
{
int rlim_cur;
int rlim_max;
};
But /usr/include/asm/type.h have
typedef long int rlim_t;
But also if have __USE_FILE_OFFSET64 rlim_t64. :-(
I think, may be set as from last_patch ;)
--w
vodz
-------------- next part --------------
diff -rbu busybox.orig/networking/inetd.c busybox/networking/inetd.c
--- busybox.orig/networking/inetd.c Mon Feb 10 18:55:19 2003
+++ busybox/networking/inetd.c Mon Feb 10 19:07:38 2003
@@ -156,6 +156,24 @@
static struct rlimit rlim_ofile;
#endif
+#define INETD_UNSUPPORT_BILTIN 1
+
+/* Check unsupporting builtin */
+#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO
+#undef INETD_UNSUPPORT_BILTIN
+#endif
+#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD
+#undef INETD_UNSUPPORT_BILTIN
+#endif
+#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME
+#undef INETD_UNSUPPORT_BILTIN
+#endif
+#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME
+#undef INETD_UNSUPPORT_BILTIN
+#endif
+#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN
+#undef INETD_UNSUPPORT_BILTIN
+#endif
static struct servtab {
char *se_service; /* name of service */
@@ -197,35 +215,28 @@
static sigset_t blockmask, emptymask;
-#define INETD_UNSUPPORT_BILTIN 1
-
/* Echo received data */
#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO
-#undef INETD_UNSUPPORT_BILTIN
static void echo_stream(int, struct servtab *);
static void echo_dg(int, struct servtab *);
#endif
/* Internet /dev/null */
#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD
-#undef INETD_UNSUPPORT_BILTIN
static void discard_stream(int, struct servtab *);
static void discard_dg(int, struct servtab *);
#endif
/* Return 32 bit time since 1900 */
#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME
-#undef INETD_UNSUPPORT_BILTIN
static void machtime_stream(int, struct servtab *);
static void machtime_dg(int, struct servtab *);
#endif
/* Return human-readable time */
#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME
-#undef INETD_UNSUPPORT_BILTIN
static void daytime_stream(int, struct servtab *);
static void daytime_dg(int, struct servtab *);
#endif
/* Familiar character generator */
#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN
-#undef INETD_UNSUPPORT_BILTIN
static void chargen_stream(int, struct servtab *);
static void chargen_dg(int, struct servtab *);
#endif
@@ -536,7 +547,11 @@
rl.rlim_cur = MIN(rl.rlim_max, rl.rlim_cur + FD_CHUNK);
if (rl.rlim_cur <= rlim_ofile_cur) {
syslog(LOG_ERR,
- "bump_nofile: cannot extend file limit, max = %d",
+#if _FILE_OFFSET_BITS == 64
+ "bump_nofile: cannot extend file limit, max = %lld",
+#else
+ "bump_nofile: cannot extend file limit, max = %ld",
+#endif
rl.rlim_cur);
return -1;
}
More information about the busybox
mailing list