summaryrefslogtreecommitdiff
path: root/networking/inetd.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-02-10 22:31:09 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-02-10 22:31:09 +0000
commitb1207b33206a52f733067850be79931373632e39 (patch)
treeec9d7e56e8a5b2ec11df9512e37a40d5c575ea8a /networking/inetd.c
parent3d2405cfb30ccc8113839c1be3ee265597b857a6 (diff)
downloadbusybox-w32-b1207b33206a52f733067850be79931373632e39.tar.gz
busybox-w32-b1207b33206a52f733067850be79931373632e39.tar.bz2
busybox-w32-b1207b33206a52f733067850be79931373632e39.zip
Fix compile error, last_patch82 by Vladimir N. Oleynik
Diffstat (limited to 'networking/inetd.c')
-rw-r--r--networking/inetd.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index 047358c90..0b8075249 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -156,6 +156,24 @@ static int rlim_ofile_cur = OPEN_MAX;
156static struct rlimit rlim_ofile; 156static struct rlimit rlim_ofile;
157#endif 157#endif
158 158
159#define INETD_UNSUPPORT_BILTIN 1
160
161/* Check unsupporting builtin */
162#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO
163#undef INETD_UNSUPPORT_BILTIN
164#endif
165#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD
166#undef INETD_UNSUPPORT_BILTIN
167#endif
168#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME
169#undef INETD_UNSUPPORT_BILTIN
170#endif
171#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME
172#undef INETD_UNSUPPORT_BILTIN
173#endif
174#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN
175#undef INETD_UNSUPPORT_BILTIN
176#endif
159 177
160static struct servtab { 178static struct servtab {
161 char *se_service; /* name of service */ 179 char *se_service; /* name of service */
@@ -197,35 +215,28 @@ static int timingout;
197static sigset_t blockmask, emptymask; 215static sigset_t blockmask, emptymask;
198 216
199 217
200#define INETD_UNSUPPORT_BILTIN 1
201
202 /* Echo received data */ 218 /* Echo received data */
203#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO 219#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO
204#undef INETD_UNSUPPORT_BILTIN
205static void echo_stream(int, struct servtab *); 220static void echo_stream(int, struct servtab *);
206static void echo_dg(int, struct servtab *); 221static void echo_dg(int, struct servtab *);
207#endif 222#endif
208 /* Internet /dev/null */ 223 /* Internet /dev/null */
209#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD 224#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD
210#undef INETD_UNSUPPORT_BILTIN
211static void discard_stream(int, struct servtab *); 225static void discard_stream(int, struct servtab *);
212static void discard_dg(int, struct servtab *); 226static void discard_dg(int, struct servtab *);
213#endif 227#endif
214 /* Return 32 bit time since 1900 */ 228 /* Return 32 bit time since 1900 */
215#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME 229#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME
216#undef INETD_UNSUPPORT_BILTIN
217static void machtime_stream(int, struct servtab *); 230static void machtime_stream(int, struct servtab *);
218static void machtime_dg(int, struct servtab *); 231static void machtime_dg(int, struct servtab *);
219#endif 232#endif
220 /* Return human-readable time */ 233 /* Return human-readable time */
221#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME 234#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME
222#undef INETD_UNSUPPORT_BILTIN
223static void daytime_stream(int, struct servtab *); 235static void daytime_stream(int, struct servtab *);
224static void daytime_dg(int, struct servtab *); 236static void daytime_dg(int, struct servtab *);
225#endif 237#endif
226 /* Familiar character generator */ 238 /* Familiar character generator */
227#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN 239#ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN
228#undef INETD_UNSUPPORT_BILTIN
229static void chargen_stream(int, struct servtab *); 240static void chargen_stream(int, struct servtab *);
230static void chargen_dg(int, struct servtab *); 241static void chargen_dg(int, struct servtab *);
231#endif 242#endif
@@ -536,7 +547,11 @@ bump_nofile(void)
536 rl.rlim_cur = MIN(rl.rlim_max, rl.rlim_cur + FD_CHUNK); 547 rl.rlim_cur = MIN(rl.rlim_max, rl.rlim_cur + FD_CHUNK);
537 if (rl.rlim_cur <= rlim_ofile_cur) { 548 if (rl.rlim_cur <= rlim_ofile_cur) {
538 syslog(LOG_ERR, 549 syslog(LOG_ERR,
539 "bump_nofile: cannot extend file limit, max = %d", 550#if _FILE_OFFSET_BITS == 64
551 "bump_nofile: cannot extend file limit, max = %lld",
552#else
553 "bump_nofile: cannot extend file limit, max = %ld",
554#endif
540 rl.rlim_cur); 555 rl.rlim_cur);
541 return -1; 556 return -1;
542 } 557 }