Skip to content

Commit

Permalink
(mingw) Fix MinGW build error for new LibXML2 headers (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh123 authored Dec 21, 2023
1 parent 9b1d350 commit dbf56f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions apps/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define snprintf _snprintf
#endif

#include <stdlib.h>
#include <string.h>

#include <xmlsec/xmlsec.h>
Expand Down
10 changes: 5 additions & 5 deletions src/errors_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extern "C" {
*/
#define xmlSecXmlError(errorFunction, errorObject) \
{ \
xmlErrorPtr error = xmlGetLastError(); \
const xmlError * error = xmlGetLastError(); \
int code = (error != NULL) ? error->code : 0; \
const char* message = (error != NULL) ? error->message : NULL; \
xmlSecError(XMLSEC_ERRORS_HERE, \
Expand All @@ -159,7 +159,7 @@ extern "C" {
*/
#define xmlSecXmlError2(errorFunction, errorObject, msg, param) \
{ \
xmlErrorPtr error = xmlGetLastError(); \
const xmlError * error = xmlGetLastError(); \
int code = (error != NULL) ? error->code : 0; \
const char* message = (error != NULL) ? error->message : NULL; \
xmlSecError(XMLSEC_ERRORS_HERE, \
Expand All @@ -181,7 +181,7 @@ extern "C" {
*/
#define xmlSecXmlParserError(errorFunction, ctxt, errorObject) \
{ \
xmlErrorPtr error = xmlCtxtGetLastError(ctxt);\
const xmlError * error = xmlCtxtGetLastError(ctxt);\
int code = (error != NULL) ? error->code : 0; \
const char* message = (error != NULL) ? error->message : NULL; \
xmlSecError(XMLSEC_ERRORS_HERE, \
Expand All @@ -205,7 +205,7 @@ extern "C" {
*/
#define xmlSecXmlParserError2(errorFunction, ctxt, errorObject, msg, param) \
{ \
xmlErrorPtr error = xmlCtxtGetLastError(ctxt);\
const xmlError * error = xmlCtxtGetLastError(ctxt);\
int code = (error != NULL) ? error->code : 0; \
const char* message = (error != NULL) ? error->message : NULL; \
xmlSecError(XMLSEC_ERRORS_HERE, \
Expand All @@ -227,7 +227,7 @@ extern "C" {
*/
#define xmlSecXsltError(errorFunction, ctxt, errorObject) \
{ \
xmlErrorPtr error = xmlGetLastError(); \
const xmlError * error = xmlGetLastError(); \
int code = (error != NULL) ? error->code : 0; \
const char* message = (error != NULL) ? error->message : NULL; \
xmlSecError(XMLSEC_ERRORS_HERE, \
Expand Down

0 comments on commit dbf56f8

Please sign in to comment.