-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while building stubs.cpp: a reinterpret_cast is not a constant expression #11
Comments
any updates? |
PRs welcome |
I was able to fix it with using older g++-6 efihooks.cpp:110:3: error: conflicting declaration ‘typedef struct EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL’} EFI_DEVICE_PATH_PROTOCOL; |
Install gnu-efi-3.0.3 |
This patch allowed me to build diff --git i/efiperun/efihooks.cpp w/efiperun/efihooks.cpp
index 600f409..941c9a2 100644
--- i/efiperun/efihooks.cpp
+++ w/efiperun/efihooks.cpp
@@ -103,27 +103,27 @@ typedef struct _EFI_ACPI_SUPPORT_PROTOCOL {
void* PublishTables;
} EFI_ACPI_SUPPORT_PROTOCOL;
-typedef struct __attribute__((packed)) {
- UINT8 Type;
- UINT8 SubType;
- UINT8 Length[2];
-} EFI_DEVICE_PATH_PROTOCOL;
-
-typedef struct {
- UINT32 Revision;
- EFI_HANDLE ParentHandle;
- EFI_SYSTEM_TABLE *SystemTable;
- EFI_HANDLE DeviceHandle;
- EFI_DEVICE_PATH_PROTOCOL *FilePath;
- VOID *Reserved;
- UINT32 LoadOptionsSize;
- VOID *LoadOptions;
- VOID *ImageBase;
- UINT64 ImageSize;
- EFI_MEMORY_TYPE ImageCodeType;
- EFI_MEMORY_TYPE ImageDataType;
- VOID* Unload;
-} EFI_LOADED_IMAGE_PROTOCOL;
+// typedef struct __attribute__((packed)) {
+// UINT8 Type;
+// UINT8 SubType;
+// UINT8 Length[2];
+// } EFI_DEVICE_PATH_PROTOCOL;
+
+// typedef struct {
+// UINT32 Revision;
+// EFI_HANDLE ParentHandle;
+// EFI_SYSTEM_TABLE *SystemTable;
+// EFI_HANDLE DeviceHandle;
+// EFI_DEVICE_PATH_PROTOCOL *FilePath;
+// VOID *Reserved;
+// UINT32 LoadOptionsSize;
+// VOID *LoadOptions;
+// VOID *ImageBase;
+// UINT64 ImageSize;
+// EFI_MEMORY_TYPE ImageCodeType;
+// EFI_MEMORY_TYPE ImageDataType;
+// VOID* Unload;
+// } EFI_LOADED_IMAGE_PROTOCOL;
typedef struct {
void* data;
diff --git i/efiperun/main.h w/efiperun/main.h
index b0304bb..8fbdce9 100644
--- i/efiperun/main.h
+++ w/efiperun/main.h
@@ -27,7 +27,7 @@ namespace std
{
template<> struct hash<EFI_GUID>
{
- constexpr size_t operator()(EFI_GUID const& s) const
+ size_t operator()(EFI_GUID const& s) const
{
return ((UINT64*)&s)[0]^((UINT64*)&s)[1];
} |
I can also build same way to @Ristovski |
G++ version is g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0
The text was updated successfully, but these errors were encountered: