compat: Add libtinyxml2 shim
Change-Id: I2bc7963086f7f5df453e135819ed8b28c4d6a0d5
This commit is contained in:
parent
844cbbb2d3
commit
5c54e69ef0
2 changed files with 30 additions and 0 deletions
|
@ -332,3 +332,11 @@ cc_library {
|
|||
],
|
||||
vendor_available: true,
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libtinyxml2_shim",
|
||||
srcs: ["libtinyxml2/XMLDocument.cpp"],
|
||||
shared_libs: ["libtinyxml2"],
|
||||
system_ext_specific: true,
|
||||
vendor_available: true,
|
||||
}
|
||||
|
|
22
libtinyxml2/XMLDocument.cpp
Normal file
22
libtinyxml2/XMLDocument.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <tinyxml2.h>
|
||||
#include <new>
|
||||
|
||||
namespace tinyxml2 {
|
||||
|
||||
extern "C" {
|
||||
void* _ZN8tinyxml211XMLDocumentC1Eb(XMLDocument* thisptr, bool processEntities) {
|
||||
return new (thisptr) XMLDocument(processEntities);
|
||||
}
|
||||
|
||||
XMLError _ZN8tinyxml211XMLDocument8SaveFileEPKc(XMLDocument* thisptr, const char* filename) {
|
||||
return thisptr->SaveFile(filename);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tinyxml2
|
Loading…
Reference in a new issue