From 48d770018959bbe434467f7003175881c3f3a7be Mon Sep 17 00:00:00 2001 From: wang_yue111 <648774160@qq.com> Date: Wed, 15 Jul 2020 11:59:09 +0800 Subject: [PATCH] fix compile error include libtirpc because glibc doe --- ...r-include-libtirpc-because-glibc-doe.patch | 41 +++++++++++++++++++ webbench.spec | 8 +++- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 fix-compile-error-include-libtirpc-because-glibc-doe.patch diff --git a/fix-compile-error-include-libtirpc-because-glibc-doe.patch b/fix-compile-error-include-libtirpc-because-glibc-doe.patch new file mode 100644 index 0000000..9e554b7 --- /dev/null +++ b/fix-compile-error-include-libtirpc-because-glibc-doe.patch @@ -0,0 +1,41 @@ +From 9fe49021d6e063d42a77dd2d79681bc4bc403476 Mon Sep 17 00:00:00 2001 +From: wangxiao65 <287608437@qq.com> +Date: Wed, 15 Jul 2020 11:22:47 +0800 +Subject: [PATCH] fix compile error, include libtirpc, because glibc does not + provide rpc. + +--- + Makefile | 4 ++-- + webbench.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 47196bc..8e19df7 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ +-CFLAGS?= -Wall -ggdb -W -O ++CFLAGS?= -Wall -ggdb -W -O -I/usr/include/tirpc + CC?= gcc + LIBS?= +-LDFLAGS?= ++LDFLAGS?= -ltirpc + PREFIX?= /usr/local + VERSION=1.5 + TMPDIR=/tmp/webbench-$(VERSION) +diff --git a/webbench.c b/webbench.c +index fa1b02f..c12d831 100644 +--- a/webbench.c ++++ b/webbench.c +@@ -25,7 +25,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +-- +2.23.0 + diff --git a/webbench.spec b/webbench.spec index eba3ffd..f290cd1 100644 --- a/webbench.spec +++ b/webbench.spec @@ -2,15 +2,16 @@ Name: webbench Version: 1.5 -Release: 1 +Release: 2 Summary: simple tool for benchmarking WWW or proxy servers License: GPL URL: http://home.tiscali.cz/~cz210552/webbench.html Source0: http://home.tiscali.cz/~cz210552/distfiles/%{name}-%{version}.tar.gz Patch0: webbench-remove-socket-file-and-reimplement-function.patch +Patch1: fix-compile-error-include-libtirpc-because-glibc-doe.patch -BuildRequires: gcc +BuildRequires: gcc libtirpc-devel %description Web Bench is very simple tool for benchmarking WWW or proxy servers. Uses fork() for simulating multiple clients and can use HTTP/0.9-HTTP/1.1 requests. This benchmark is not very realistic, but it can test if your HTTPD can realy handle that many clients at once (try to run some CGIs) without taking your machine down. Displays pages/min and bytes/sec. Can be used in more aggressive mode with -f switch @@ -19,6 +20,7 @@ Web Bench is very simple tool for benchmarking WWW or proxy servers. Uses fork() %setup -q -n %{name}-%{version}/ #remove unclear license file socket.c and reimplement socket function. %patch0 -p1 +%patch1 -p1 %build %make_build @@ -40,6 +42,8 @@ Web Bench is very simple tool for benchmarking WWW or proxy servers. Uses fork() %{_mandir}/* %changelog +* Wed Jul 15 2020 Wang Xiao - 1.5-2 +- Fix compile error, include BuildRequires libtirpc, because glibc does not provide rpc * Sun Mar 29 2020 Wei Xiong - Package init -- Gitee