Skip to content

Commit

Permalink
FIX: fix build error with libxml2 2.13.0 (#103)
Browse files Browse the repository at this point in the history
libxml2 2.13.0 changed which header file to define functions
and header inclusion. Due to this refactoring, some yaz source
files need additional inclusion of libxml2 header file,
especially for libxml/parser.h .

Closes #102 .
  • Loading branch information
mtasaka authored Jun 18, 2024
1 parent 4fa9938 commit b684b2f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
#include <readline/history.h>
#endif

#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif


#include "admin.h"
#include "tabcomplete.h"
Expand Down
1 change: 1 addition & 0 deletions src/record_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <yaz/base64.h>

#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#endif
Expand Down
3 changes: 3 additions & 0 deletions test/test_ccl.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#include <yaz/log.h>
#include <yaz/test.h>

#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif

static int tst_ccl_query(CCL_bibset bibset,
const char *query,
Expand Down
1 change: 1 addition & 0 deletions test/test_icu.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#endif

#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#endif

Expand Down
3 changes: 3 additions & 0 deletions test/test_xml_include.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

#include <yaz/xml_include.h>
#include <yaz/test.h>
#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif

static void tst_xml_include1(void)
{
Expand Down
3 changes: 3 additions & 0 deletions util/cclsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include <readline/history.h>
#endif

#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif

static int debug = 0;
static char *prog;
Expand Down
2 changes: 2 additions & 0 deletions util/yaz-icu.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#if YAZ_HAVE_ICU

#include <libxml/parser.h>

#include <unicode/ucnv.h>
#include <unicode/ustring.h>
#include <unicode/ucol.h>
Expand Down
4 changes: 4 additions & 0 deletions util/yaz-record-conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include <yaz/record_conv.h>
#include <yaz/backtrace.h>

#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif

const char *prog = "yaz-record-conv";

static void usage(void)
Expand Down

0 comments on commit b684b2f

Please sign in to comment.