Fix compile error on certain gcc versions

Change-Id: I8a4fab76d1dcc576eb7706ab45fc786c0cab274a
This commit is contained in:
David Yat Sin
2024-02-09 02:15:27 +00:00
parent ae16b3e14e
commit 5b28a1bc17
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -51,6 +51,7 @@
#include <string>
#include <vector>
#include <stdint.h>
#if defined(__GNUC__)
#define __forceinline __inline__ __attribute__((always_inline))
@@ -39,6 +39,7 @@
// DEALINGS WITH THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
#include <unistd.h>
#include <elf.h>
#include <fcntl.h>
@@ -72,7 +73,7 @@ class PackageBuilder {
void Write(const T& v) {
st_.write((char*)&v, sizeof(T));
}
void Write(const std::vector<std::uint8_t>& v) { st_.write((const char*)v.data(), v.size()); }
void Write(const std::vector<uint8_t>& v) { st_.write((const char*)v.data(), v.size()); }
void Write(void* data, uint32_t size) { st_.write((const char*)data, size); }
bool GetBuffer(void* out) {
size_t sz = Size();