Opened 2 years ago

Closed 2 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:

Description (last modified by historic_bruno)

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 2 years ago.
Updated patch to follow api changes specified by upstream libxml2

Download all attachments as: .zip

Change History (5)

comment:1 follow-up: Changed 2 years ago by historic_bruno

  • Component changed from Core engine to Build & Packages
  • Milestone changed from Backlog to Alpha 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 2 years ago by pcpa

Updated patch to follow api changes specified by upstream libxml2

comment:2 in reply to: ↑ 1 Changed 2 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 2 years ago by historic_bruno

  • Description modified (diff)

comment:4 Changed 2 years ago by historic_bruno

  • Keywords review removed
  • Resolution set to fixed
  • Status changed from new to closed

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.