Mailinglist Archive: zypp-commit (38 mails)

< Previous Next >
[zypp-commit] <sat-solver> master : - adapt to build with rpm-4.7
  • From: Michael Schroeder <mls@xxxxxxx>
  • Date: Mon, 31 Aug 2009 12:33:42 +0200
  • Message-id: <E1Mi4Ds-0004Hr-4b@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit b7138441b93344663631cd660d83ab6d97193283
Author: Michael Schroeder <mls@xxxxxxx>
Date: Mon Aug 31 12:33:42 2009 +0200

- adapt to build with rpm-4.7
---
CMakeLists.txt | 8 +++++---
ext/repo_rpmdb.c | 10 +++++-----
2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 829fed4..9f7522a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,11 +38,13 @@ FIND_PACKAGE(ZLIB REQUIRED)
IF ( FEDORA )
MESSAGE(STATUS "Building for Fedora")
ADD_DEFINITIONS( -DFEDORA )
-FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm)
-ELSE ( FEDORA )
-FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
ENDIF ( FEDORA)

+FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
+IF ( NOT RPMDB_LIBRARY )
+FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm)
+ENDIF( NOT RPMDB_LIBRARY )
+
SET( PACKAGE "satsolver" )
SET( VERSION
"${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}" )

diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index 8947f9a..d87e90f 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -22,14 +22,14 @@
#include <unistd.h>
#include <assert.h>

-#ifdef FEDORA
-#include <db4/db.h>
-#else
-#include <rpm/db.h>
-#endif
#include <rpm/rpmio.h>
#include <rpm/rpmpgp.h>
#include <rpm/header.h>
+#include <rpm/rpmdb.h>
+
+#ifndef DB_CREATE
+#include <db4/db.h>
+#endif

#include "pool.h"
#include "repo.h"
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages