Avoid exposing <db.h> in a public header file.

This commit is contained in:
Matthew Barnes 2012-06-27 08:41:09 -04:00
parent 36770b9ab7
commit 21029f84d6
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,29 @@
diff -up evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.c.avoid-exposing-db-h evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.c
--- evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.c.avoid-exposing-db-h 2012-06-03 20:12:39.000000000 -0400
+++ evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.c 2012-06-27 08:39:11.096596229 -0400
@@ -23,6 +23,8 @@
#include <stdlib.h>
#include <string.h>
+#include <db.h>
+
#include "e-book-backend-db-cache.h"
#include "e-book-backend.h"
#include "e-book-backend-sexp.h"
diff -up evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.h.avoid-exposing-db-h evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.h
--- evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.h.avoid-exposing-db-h 2012-06-03 20:12:39.000000000 -0400
+++ evolution-data-server-3.5.3/addressbook/libedata-book/e-book-backend-db-cache.h 2012-06-27 08:39:11.096596229 -0400
@@ -27,10 +27,12 @@
#define E_BOOK_BACKEND_DB_CACHE_H
#include <libebook/libebook.h>
-#include "db.h"
G_BEGIN_DECLS
+/* Avoid including <db.h> in a public header file. */
+typedef struct __db DB;
+
EContact * e_book_backend_db_cache_get_contact (DB *db, const gchar *uid);
gchar *e_book_backend_db_cache_get_filename (DB *db);
void e_book_backend_db_cache_set_filename (DB *db, const gchar *filename);

View File

@ -27,7 +27,7 @@
Name: evolution-data-server
Version: 3.5.3
Release: 2%{?dist}
Release: 3%{?dist}
Group: System Environment/Libraries
Summary: Backend data server for Evolution
License: LGPLv2+
@ -46,6 +46,9 @@ Patch01: evolution-data-server-1.11.5-fix-64bit-acinclude.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=672805
Patch2: new-gweather-api.patch
# Avoid exposing <db.h> in a public header file.
Patch3: evolution-data-server-3.5.3-avoid-exposing-db-h.patch
### Build Dependencies ###
BuildRequires: bison
@ -127,6 +130,7 @@ This package contains developer documentation for %{name}.
%patch01 -p1 -b .fix-64bit-acinclude
%patch2 -p1 -b .new-gweather-api
%patch3 -p1 -b .avoid-exposing-db-h
mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib
@ -371,6 +375,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_datadir}/gtk-doc/html/libedataserverui
%changelog
* Wed Jun 27 2012 Matthew Barnes <mbarnes@redhat.com> - 3.5.3-3
- Avoid exposing <db.h> in a public header file.
* Wed Jun 27 2012 Matthias Clasen <mclasen@redhat.com> - 3.5.3-2
- Build against libgweather 3.5