Skip to content

Commit

Permalink
Use correct includes
Browse files Browse the repository at this point in the history
rpmvercmp is defined in rpm/rpmver.h
risdigit is defined in rpm/rpmstring.h

Resolves: rhbz#2080210
  • Loading branch information
jan-cerny committed May 24, 2022
1 parent 39e96ab commit 8dec1bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/FindRPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ set(RPM_VERSION ${RPM_PKGCONF_VERSION})
if(RPM_VERSION)
string(COMPARE GREATER "4.6" ${RPM_VERSION} RPM46_FOUND)
string(COMPARE GREATER "4.7" ${RPM_VERSION} RPM47_FOUND)
if(NOT (RPM_VERSION VERSION_LESS "4.18"))
set(RPM418_FOUND 1)
endif()
endif()

# Set the include dir variables and the libraries and let libfind_process do the rest.
Expand Down
1 change: 1 addition & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#cmakedefine HAVE_RPMVERCMP
#cmakedefine RPM46_FOUND
#cmakedefine RPM47_FOUND
#cmakedefine RPM418_FOUND

#cmakedefine BZIP2_FOUND

Expand Down
5 changes: 5 additions & 0 deletions src/OVAL/results/oval_cmp_evr_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
#include "common/_error.h"

#ifdef HAVE_RPMVERCMP
#ifdef RPM418_FOUND
#include <rpm/rpmver.h>
#include <rpm/rpmstring.h>
#else
#include <rpm/rpmlib.h>
#endif
#else
#ifdef OS_WINDOWS
#include <malloc.h>
Expand Down

0 comments on commit 8dec1bb

Please sign in to comment.