diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-11-12 02:29:48 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-11-12 08:59:45 +0100 |
commit | cb1323a95c7d3275677760efd96a3eb9824c8aa8 (patch) | |
tree | 2303fbf6036ef6791974cd7cf60754aeecf765cc /source/a/quota | |
parent | 374248fe50672549bd1e5cd53ddb5bdfdcc66b65 (diff) | |
download | current-cb1323a95c7d3275677760efd96a3eb9824c8aa8.tar.gz |
Mon Nov 12 02:29:48 UTC 201820181112022948
a/quota-4.04-x86_64-2.txz: Rebuilt.
Fixed high CPU usage. Thanks to allend.
ap/nano-3.2-x86_64-1.txz: Upgraded.
x/libXcm-0.5.4-x86_64-1.txz: Upgraded.
x/xcm-0.5.4-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/quota')
-rwxr-xr-x | source/a/quota/quota.SlackBuild | 3 | ||||
-rw-r--r-- | source/a/quota/quotad.fix.high.cpu.usage.diff | 35 |
2 files changed, 37 insertions, 1 deletions
diff --git a/source/a/quota/quota.SlackBuild b/source/a/quota/quota.SlackBuild index ad67fc30..ee7ed2c9 100755 --- a/source/a/quota/quota.SlackBuild +++ b/source/a/quota/quota.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=quota VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -85,6 +85,7 @@ tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 cd $PKGNAM-$VERSION || exit 1 zcat $CWD/quota.lwrap.needs.lnsl.diff.gz | patch -p1 --verbose || exit 1 +zcat $CWD/quotad.fix.high.cpu.usage.diff.gz | patch -p1 -l --verbose || exit 1 autoreconf -vif diff --git a/source/a/quota/quotad.fix.high.cpu.usage.diff b/source/a/quota/quotad.fix.high.cpu.usage.diff new file mode 100644 index 00000000..5dfafc9f --- /dev/null +++ b/source/a/quota/quotad.fix.high.cpu.usage.diff @@ -0,0 +1,35 @@ +diff -up quota-4.04/svc_socket.c.orig quota-4.04/svc_socket.c +--- quota-4.04/svc_socket.c.orig 2017-09-05 10:04:16.000000000 -0400 ++++ quota-4.04/svc_socket.c 2018-05-12 14:46:44.813388914 -0400 +@@ -118,6 +118,15 @@ static int svc_create_sock(struct addrin + return -1; + } + ++ if (ai->ai_family == AF_INET6) { ++ if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, ++ &optval, sizeof(optval)) < 0) { ++ errstr(_("Cannot set ipv6 socket options: %s\n"), strerror(errno)); ++ close(fd); ++ return -1; ++ } ++ } ++ + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) { + errstr(_("Cannot set socket options: %s\n"), strerror(errno)); + close(fd); +@@ -129,6 +138,15 @@ static int svc_create_sock(struct addrin + close(fd); + return -1; + } ++ ++ if (ai->ai_protocol == IPPROTO_TCP) { ++ if (listen(fd, SOMAXCONN) < 0) { ++ errstr(_("Cannot listen to address: %s\n"), strerror(errno)); ++ close(fd); ++ return -1; ++ } ++ } ++ + return fd; + } + |