From 1fd8dd0b77dac903bedfbb856a2e5b50a64389a4 Mon Sep 17 00:00:00 2001 From: Tim Semeijn Date: Tue, 20 Feb 2024 13:09:00 +0100 Subject: [PATCH] Fix failing builds with *_poll build patch (3proxy-0.9.4-poll-build.patch) Convert license to SPDX --- 3proxy-0.9.4-poll-build.patch | 48 +++++++++++++++++++++++++++++++++++ 3proxy.spec | 10 ++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 3proxy-0.9.4-poll-build.patch diff --git a/3proxy-0.9.4-poll-build.patch b/3proxy-0.9.4-poll-build.patch new file mode 100644 index 0000000..2afcfe2 --- /dev/null +++ b/3proxy-0.9.4-poll-build.patch @@ -0,0 +1,48 @@ +--- src/common.c ++++ src/common.c +@@ -156,7 +156,7 @@ + WINAPI + #endif + +- mypoll(struct mypollfd *fds, unsigned int nfds, int timeout){ ++ mypoll(struct mypollfd *fds, nfds_t nfds, int timeout){ + fd_set readfd; + fd_set writefd; + fd_set oobfd; +--- src/structures.h ++++ src/structures.h +@@ -66,6 +66,7 @@ + #ifdef WITH_POLL + #include + #else ++typedef unsigned int nfds_t; + #ifdef WITH_WSAPOLL + + #define poll(A,B,C) WSAPoll(A,B,C) +@@ -81,7 +82,7 @@ + #ifdef _WIN32 + WINAPI + #endif +- mypoll(struct mypollfd *fds, unsigned int nfds, int timeout); ++ mypoll(struct mypollfd *fds, nfds_t nfds, int timeout); + #ifndef POLLIN + #define POLLIN 1 + #endif +@@ -694,7 +695,7 @@ + int (WINAPI *_getsockname)(SOCKET s, struct sockaddr * name, int * namelen); + int (WINAPI *_getsockopt)(SOCKET s, int level, int optname, char * optval, int * optlen); + int (WINAPI *_setsockopt)(SOCKET s, int level, int optname, const char *optval, int optlen); +- int (WINAPI *_poll)(struct pollfd *fds, unsigned int nfds, int timeout); ++ int (WINAPI *_poll)(struct pollfd *fds, nfds_t nfds, int timeout); + int (WINAPI *_send)(SOCKET s, const char *msg, int len, int flags); + int (WINAPI *_sendto)(SOCKET s, const char *msg, int len, int flags, const struct sockaddr *to, int tolen); + int (WINAPI *_recv)(SOCKET s, char *buf, int len, int flags); +@@ -711,7 +712,7 @@ + int (*_getsockname)(SOCKET s, struct sockaddr * name, socklen_t * namelen); + int (*_getsockopt)(SOCKET s, int level, int optname, void * optval, socklen_t * optlen); + int (*_setsockopt)(int s, int level, int optname, const void *optval, socklen_t optlen); +- int (*_poll)(struct pollfd *fds, unsigned int nfds, int timeout); ++ int (*_poll)(struct pollfd *fds, nfds_t nfds, int timeout); + size_t (*_send)(SOCKET s, const void *msg, size_t len, int flags); + size_t (*_sendto)(SOCKET s, const void *msg, size_t len, int flags, const struct sockaddr *to, SASIZETYPE tolen); + size_t (*_recv)(SOCKET s, void *buf, size_t len, int flags); diff --git a/3proxy.spec b/3proxy.spec index f0ef64e..9525c39 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -2,12 +2,12 @@ Name: 3proxy Version: 0.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер -License: BSD or ASL 2.0 or GPLv2+ or LGPLv2+ +License: BSD-3-Clause OR Apache-2.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later Url: http://3proxy.ru/?l=EN Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source2: 3proxy.cfg @@ -20,6 +20,8 @@ BuildRequires: systemd-rpm-macros # I correct config path in man only. It is fully Fedora related. Patch0: 3proxy-0.6.1-config-path.patch +# Fixes *_poll build error +Patch1: 3proxy-0.9.4-poll-build.patch %description %{name} -- light proxy server. @@ -89,6 +91,10 @@ done %{_unitdir}/%{name}.service %changelog +* Tue Feb 20 2024 Tim Semeijn - 0.9.4-2 +- Fix failing builds with *_poll build patch (3proxy-0.9.4-poll-build.patch) +- Convert license to SPDX + * Sun Feb 11 2024 Fabio Alessandro Locati - 0.9.4-1 - Update to 0.9.4, fixes rhbz#1888503 - Fix FTBFS, fixes rhbz#2261821