summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-25 23:00:44 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-25 23:17:58 +0300
commitffe63ca427ef610f9073988302e066bf5e04df96 (patch)
tree82158e6b6f0cac48a6ca18618c35470bcaa95ddd
parent74ab5db53242dfa88635d029c2bdce77a0a38f03 (diff)
downloadfakeroot-ffe63ca427ef610f9073988302e066bf5e04df96.tar.gz
Bind on port 0
-rw-r--r--debian/patches/dyson-bind-0.patch22
-rw-r--r--debian/patches/series1
2 files changed, 23 insertions, 0 deletions
diff --git a/debian/patches/dyson-bind-0.patch b/debian/patches/dyson-bind-0.patch
new file mode 100644
index 0000000..f40ae6b
--- /dev/null
+++ b/debian/patches/dyson-bind-0.patch
@@ -0,0 +1,22 @@
+Description: it is ok to bind on 0, otherwise it fails with
+fakeroot daemon: listen (Address family not supported by protocol family)
+Index: fakeroot.git/faked.c
+===================================================================
+--- fakeroot.git.orig/faked.c
++++ fakeroot.git/faked.c
+@@ -1434,7 +1434,6 @@ int main(int argc, char **argv){
+ if (setsockopt(sd, SOL_TCP, TCP_NODELAY, &val, sizeof (val)) < 0)
+ fail("setsockopt(TCP_NODELAY)");
+
+- if (port > 0) {
+ memset((char *) &addr, 0, sizeof (addr));
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+@@ -1442,7 +1441,6 @@ int main(int argc, char **argv){
+
+ if (bind(sd, (struct sockaddr *) &addr, sizeof (addr)) < 0)
+ fail("bind");
+- }
+
+ if (listen(sd, SOMAXCONN) < 0)
+ fail("listen");
diff --git a/debian/patches/series b/debian/patches/series
index 23300c7..e1c0fe4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ eglibc-fts-without-LFS
fix-shell-in-fakeroot
hide-dlsym-error.patch
dyson-acl.patch
+dyson-bind-0.patch