From a2d057814034cb23fe155e37a41e6e2e3da2567a45d458e595e1f42601d8a33f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 18 Jun 2023 18:43:24 +0000 Subject: [PATCH] Accepting request 1093660 from home:bluca:branches:devel:libraries:c_c++ - Add Mark-pgm_family_string-as-inline.patch to fix building packages that include the PGM headers without using pgm_family_string() by marking it 'inline' to avoid unused-function warnings. Sent upstream: https://github.com/steve-o/openpgm/pull/74 OBS-URL: https://build.opensuse.org/request/show/1093660 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=32 --- Mark-pgm_family_string-as-inline.patch | 24 ++++++++++++++++++++++++ openpgm.changes | 8 ++++++++ openpgm.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 Mark-pgm_family_string-as-inline.patch diff --git a/Mark-pgm_family_string-as-inline.patch b/Mark-pgm_family_string-as-inline.patch new file mode 100644 index 0000000..baae7e4 --- /dev/null +++ b/Mark-pgm_family_string-as-inline.patch @@ -0,0 +1,24 @@ +Author: Luca Boccassi +Description: Mark pgm_family_string as 'inline' + Functions defined in headers need to be 'static inline', otherwise the compiler + will generate an unused-function warning for every program that includes the + header but doesn't use the function. + + In file included from /usr/include/pgm-5.3/pgm/skbuff.h:39, + from /usr/include/pgm-5.3/pgm/msgv.h:33, + from /usr/include/pgm-5.3/pgm/pgm.h:44, + from src/ip.cpp:53: + /usr/include/pgm-5.3/pgm/socket.h:207:1: error: 'const char* pgm_family_string(int)' defined but not used [-Werror=unused-function] + 207 | pgm_family_string ( + | ^~~~~~~~~~~~~~~~~ +--- pgm.orig/include/pgm/socket.h ++++ pgm/include/pgm/socket.h +@@ -202,7 +202,7 @@ int pgm_wsapoll_info (pgm_sock_t*const restrict, WSAPOLLFD*const restrict, ULONG + int pgm_epoll_ctl (pgm_sock_t*const, const int, const int, const int); + #endif + +-static ++static inline + const char* + pgm_family_string ( + const int family diff --git a/openpgm.changes b/openpgm.changes index e3ea68c..b412971 100644 --- a/openpgm.changes +++ b/openpgm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Jun 18 13:50:39 UTC 2023 - bluca@debian.org + +- Add Mark-pgm_family_string-as-inline.patch to fix building packages that + include the PGM headers without using pgm_family_string() by marking it + 'inline' to avoid unused-function warnings. Sent upstream: + https://github.com/steve-o/openpgm/pull/74 + ------------------------------------------------------------------- Wed Jun 7 13:11:24 UTC 2023 - pgajdos@suse.com diff --git a/openpgm.spec b/openpgm.spec index 030ccba..e5e39d1 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -33,6 +33,8 @@ Group: Development/Libraries/C and C++ URL: https://github.com/steve-o/openpgm Source: https://github.com/steve-o/openpgm/archive/release-%{tarball_version}.tar.gz#/openpgm-release-%{tarball_version}.tar.gz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM https://github.com/steve-o/openpgm/pull/74 +Patch0: Mark-pgm_family_string-as-inline.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++