summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/netkit-base/files')
-rw-r--r--sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch11
-rw-r--r--sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch54
-rw-r--r--sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch26
-rw-r--r--sys-apps/netkit-base/files/inetd.rc624
4 files changed, 115 insertions, 0 deletions
diff --git a/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch b/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch
new file mode 100644
index 000000000000..266df811fd77
--- /dev/null
+++ b/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch
@@ -0,0 +1,11 @@
+--- netkit-base-0.17/inetd/servtab.c
++++ netkit-base-0.17/inetd/servtab.c
+@@ -771,7 +771,7 @@
+ return;
+ }
+
+-#define SWAP(type, a, b) {type c=(type)a; (type)a=(type)b; (type)b=(type)c;}
++#define SWAP(type, a, b) {type c=(type)a; a=(type)b; b=(type)c;}
+
+ /*
+ * sep->se_wait may be holding the pid of a daemon
diff --git a/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch b/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch
new file mode 100644
index 000000000000..9492d715e20f
--- /dev/null
+++ b/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch
@@ -0,0 +1,54 @@
+--- netkit-base-0.17/inetd/builtins.c
++++ netkit-base-0.17/inetd/builtins.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <time.h>
+
+ #include "servtab.h"
+ #include "builtins.h"
+--- netkit-base-0.17/inetd/inetd.c
++++ netkit-base-0.17/inetd/inetd.c
+@@ -869,8 +869,8 @@
+ int on = 1;
+
+ if ((sep->se_fd = socket(sep->se_family, sep->se_socktype, 0)) < 0) {
+- syslog(LOG_ERR, "%s: socket: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: socket: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+
+ if (errno == EMFILE) {
+ syslog(LOG_ALERT,
+@@ -888,8 +888,8 @@
+ syslog(LOG_ERR, "setsockopt (SO_REUSEADDR): %m");
+ #undef turnon
+ if (bind(sep->se_fd, &sep->se_ctrladdr, sep->se_ctrladdr_size) < 0) {
+- syslog(LOG_ERR, "%s: bind: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: bind: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+ (void) close(sep->se_fd);
+ sep->se_fd = -1;
+ if (!timingout) {
+@@ -938,8 +938,8 @@
+ }
+ m = sizeof(sn);
+ if (getsockname(sep->se_fd, (struct sockaddr *)&sn, &m) < 0) {
+- syslog(LOG_ERR, "%s: getsockname: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: getsockname: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+ return;
+ }
+
+@@ -1026,7 +1026,7 @@
+ if (rl.rlim_cur <= rlim_ofile_cur) {
+ syslog(LOG_ERR,
+ "bump_nofile: cannot extend file limit, max = %d",
+- rl.rlim_cur);
++ (int)rl.rlim_cur);
+ return -1;
+ }
+
diff --git a/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch b/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch
new file mode 100644
index 000000000000..3981b50e76e1
--- /dev/null
+++ b/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch
@@ -0,0 +1,26 @@
+the rpc logic here isn't terribly useful, so just punt it
+
+http://bugs.gentoo.org/371395
+
+--- a/inetd/inetd.c
++++ b/inetd/inetd.c
+@@ -158,8 +158,8 @@
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_clnt.h>
+ #undef __wait
+-#endif
+ #include <rpc/pmap_clnt.h>
++#endif
+
+ #ifndef MIN
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+--- a/inetd/inetd.h
++++ b/inetd/inetd.h
+@@ -4,7 +4,6 @@
+
+ #define RETRYTIME (60*10) /* retry time after bind/server fail */
+
+-#define RPC /* Use SunRPC */
+
+
+ /* globals */
diff --git a/sys-apps/netkit-base/files/inetd.rc6 b/sys-apps/netkit-base/files/inetd.rc6
new file mode 100644
index 000000000000..652362507fc3
--- /dev/null
+++ b/sys-apps/netkit-base/files/inetd.rc6
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting inetd"
+ (
+ # workaround for #25754
+ unset -f `declare -F | sed 's:declare -f::g'`
+ start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
+ )
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping inetd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/inetd.pid
+ eend $?
+}