diff --git a/pcp-configure-c99.patch b/pcp-configure-c99.patch new file mode 100644 index 0000000..aea9186 --- /dev/null +++ b/pcp-configure-c99.patch @@ -0,0 +1,68 @@ +Avoid calling the undeclared exit function. Include for +strcmp. Improves compatibility with future compilers which are likely +to reject implicit function declarations by default. + +Submitted upstream: + + + +diff --git a/configure b/configure +index d8726f045b264191..f285191756825493 100755 +--- a/configure ++++ b/configure +@@ -14409,7 +14409,7 @@ main () + { + + double x = 123.456; +- if (fpclassify(x) == FP_NAN) exit(1); ++ if (fpclassify(x) == FP_NAN) return 1; + + ; + return 0; +@@ -14438,7 +14438,7 @@ main () + { + + double x = 123.456; +- if (fpclassify(x) == FP_NAN) exit(1); ++ if (fpclassify(x) == FP_NAN) return 1; + + ; + return 0; +@@ -16433,6 +16433,7 @@ else + /* end confdefs.h. */ + + #include ++#include + int main () { + char b[32]=""; + time_t t = time(NULL); +diff --git a/configure.ac b/configure.ac +index f12e652dd5e6f20e..4f737c78ff63e670 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3097,7 +3097,7 @@ AC_TRY_LINK( + ], + [ + double x = 123.456; +- if (fpclassify(x) == FP_NAN) exit(1); ++ if (fpclassify(x) == FP_NAN) return 1; + ], ac_cv_func_fpclassify=yes) + AC_MSG_RESULT($ac_cv_func_fpclassify) + if test $ac_cv_func_fpclassify = no +@@ -3112,7 +3112,7 @@ then + ], + [ + double x = 123.456; +- if (fpclassify(x) == FP_NAN) exit(1); ++ if (fpclassify(x) == FP_NAN) return 1; + ], ac_cv_func_fpclassify=yes) + AC_MSG_RESULT($ac_cv_func_fpclassify) + if test $ac_cv_func_fpclassify = yes +@@ -3737,6 +3737,7 @@ AC_MSG_CHECKING([if strftime knows about %z]) + AC_TRY_RUN( + [ + #include ++#include + int main () { + char b[32]=""; + time_t t = time(NULL); diff --git a/pcp.spec b/pcp.spec index f76dd9c..f5823ef 100644 --- a/pcp.spec +++ b/pcp.spec @@ -1,12 +1,13 @@ Name: pcp Version: 6.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: System-level performance monitoring and performance management License: GPLv2+ and LGPLv2+ and CC-BY URL: https://pcp.io %global artifactory https://performancecopilot.jfrog.io/artifactory Source0: %{artifactory}/pcp-source-release/pcp-%{version}.src.tar.gz +Patch0: pcp-configure-c99.patch # The additional linker flags break out-of-tree PMDAs. # https://bugzilla.redhat.com/show_bug.cgi?id=2043092 @@ -2286,7 +2287,7 @@ updated policy package. %prep -%setup -q +%autosetup -p1 %build # the buildsubdir macro gets defined in %%setup and is apparently only available in the next step (i.e. the %%build step) @@ -3371,6 +3372,9 @@ fi %files zeroconf -f pcp-zeroconf-files.rpm %changelog +* Mon Dec 12 2022 Florian Weimer - 6.0.1-4 +- Port configure script to C99 + * Thu Nov 03 2022 Jiri Olsa - 6.0.1-3 - rebuilt for libbpf 1.0