Opened 5 years ago

Closed 5 years ago

#1656 closed defect (fixed)

[PATCH] Support for libxml2 2.9

Reported by: pcpa Owned by:
Priority: Should Have Milestone: Alpha 12
Component: Build & Packages Keywords: patch
Cc: Patch:

Description (last modified by Ben Brian)

Testing a 0ad build in an up to date fedora rawhide fails due to fcollada using now private libxm2 structure fields.

It also required a slightly modified version of the patch at #1527, as the first chunk was already applied.

The attached patch is what I could understand as being a compatible change, but only know if does build and not crash the game on a standard game against the ai.

Attachments (1)

0ad-libxml2.patch (949 bytes) - added by pcpa 5 years ago.
Updated patch to follow api changes specified by upstream libxml2

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by Ben Brian

Component: Core engineBuild & Packages
Milestone: BacklogAlpha 12

Thanks for reporting this. There's a message explaining the API change here, the important part being:

So where there is such use of direct access, check the LIBXML2_NEW_BUFFER macro and if present then

  • replace buf->buffer->content with xmlOutputBufferGetContent(buf)
  • replace buf->buffer->use with xmlOutputBufferGetSize(buf)

So I think the attached patch is not quite correct according to those suggestions, even if it appears to work. The fix doesn't look too challenging though.

Changed 5 years ago by pcpa

Attachment: 0ad-libxml2.patch added

Updated patch to follow api changes specified by upstream libxml2

comment:2 in reply to:  1 Changed 5 years ago by pcpa

Replying to historic_bruno:

Thanks for reporting this. There's a message explaining the API change here, the important part being:

So where there is such use of direct access, check the LIBXML2_NEW_BUFFER macro and if present then

  • replace buf->buffer->content with xmlOutputBufferGetContent(buf)
  • replace buf->buffer->use with xmlOutputBufferGetSize(buf)

Many thanks for reviewing the patch and pointing to the proper correction. Patch updated.

comment:3 Changed 5 years ago by Ben Brian

Description: modified (diff)

comment:4 Changed 5 years ago by Ben Brian

Keywords: review removed
Resolution: fixed
Status: newclosed

Thanks, I tested on OS X and your patch worked with old and new libxml2. Committed in r12701.

Note: See TracTickets for help on using tickets.