aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/ncp/fix-ncp-command.diff53
-rw-r--r--network/ncp/ncp.SlackBuild6
2 files changed, 58 insertions, 1 deletions
diff --git a/network/ncp/fix-ncp-command.diff b/network/ncp/fix-ncp-command.diff
new file mode 100644
index 0000000000..9d3ac54a8b
--- /dev/null
+++ b/network/ncp/fix-ncp-command.diff
@@ -0,0 +1,53 @@
+diff -Naur ncp-1.2.4/ncp.c ncp-1.2.4.patched/ncp.c
+--- ncp-1.2.4/ncp.c 2005-05-13 13:17:53.000000000 -0400
++++ ncp-1.2.4.patched/ncp.c 2025-05-14 05:54:19.123650149 -0400
+@@ -87,7 +87,7 @@
+
+ int v6tcpsock() {
+ int s;
+- if ((s=socket_tcp6())!=-1) {
++ if ((s=socket_tcp6b())!=-1) {
+ if (socket_bind6_reuse(s,(char *)V6any,8002,0)!=-1)
+ if (socket_listen(s,1)!=-1)
+ return s;
+@@ -98,7 +98,7 @@
+
+ int v4tcpsock() {
+ int s;
+- if ((s=socket_tcp4())!=-1) {
++ if ((s=socket_tcp4b())!=-1) {
+ if (socket_bind4_reuse(s,(char *)V6any,8002)!=-1)
+ if (socket_listen(s,1)!=-1)
+ return s;
+@@ -290,7 +290,7 @@
+ }
+
+ for (;;) {
+- s = socket_tcp6();
++ s = socket_tcp6b();
+ if (s==-1)
+ diesys(111,"socket");
+ if (socket_bind6(s,(char *)V6any,0,0) == -1)
+@@ -392,7 +392,7 @@
+ char **newargv;
+
+ carp("server mode. waiting for connection.");
+- s = socket_tcp6();
++ s = socket_tcp6b();
+ if (s == -1)
+ diesys(111,"socket");
+ if (socket_bind6_reuse(s,(char *)V6any,8002,0) == -1)
+@@ -430,11 +430,12 @@
+ diesys(111,"temporary unable to figure out IP address for ",*argv);
+ if (out.len < 16)
+ die(111,"no IP address for ",*argv);
+- s = socket_tcp6();
++ s = socket_tcp6b();
+ if (s==-1)
+ diesys(111,"socket");
+ if (socket_bind6(s,(char *)V6any,0,0) == -1)
+ diesys(111,"bind");
++ ndelay_off(s);
+ if (socket_connect6(s,out.s,8002,0) == -1)
+ diesys(111,"connection to ",*argv);
+ ndelay_off(s);
diff --git a/network/ncp/ncp.SlackBuild b/network/ncp/ncp.SlackBuild
index 4f18477fee..dc6ce8d238 100644
--- a/network/ncp/ncp.SlackBuild
+++ b/network/ncp/ncp.SlackBuild
@@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20250514 bkw: BUILD=5, fix ncp command (npush and npoll were already OK).
# 20230706 bkw: BUILD=4, someone updated libowfat and broke my build.
# 20230103 bkw: BUILD=3, how did I miss broken symlinks?
# 20220207 bkw: BUILD=2, libowfat changed its dir structure.
@@ -14,7 +15,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ncp
VERSION=${VERSION:-1.2.4}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -63,6 +64,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod 644 *
+# Fix from upstream's CVS. The libowfat socket API changed slightly.
+patch -p1 < $CWD/fix-ncp-command.diff
+
# We want symlinks, not hardlinks.
sed -i 's,ln -f,ln -s,' GNUmakefile