Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Fix build failures on modern linuxes #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

colstrom
Copy link

A pair of small fixes to address changes in 2012 and 2017.

With these changes, the build succeeds on two systems I tested on:

  • SLES 15SP1 with Go 1.11.9
  • OpenSUSE 15.1 with Go 1.14.2

colstrom added 2 commits June 12, 2020 10:34
On 2012-12-14, `E820_*` constants were moved to `asm/e820.h`.

References:
- torvalds/linux@af170c5

This resolves the following build failures:
```
src/novmm/loader/linux_setup.go:25:21: error: 'E820_RAM' undeclared here (not in a function)
 const int E820Ram = E820_RAM;
                     ^
src/novmm/loader/linux_setup.go:26:26: error: 'E820_RESERVED' undeclared here (not in a function)
 const int E820Reserved = E820_RESERVED;
                          ^
src/novmm/loader/linux_setup.go:27:22: error: 'E820_ACPI' undeclared here (not in a function)
 const int E820Acpi = E820_ACPI;
                      ^
```
On 2017-01-27, in `struct boot_params`, member `e820_map` was renamed twice, initially
to `e820_array` and subsequently to `e820_table`.
    
References:
- torvalds/linux@acd4c04
- torvalds/linux@61a5010
    
This resolves the following build failures:
```
src/novmm/loader/linux_setup.go: In function 'e820_set_region':
src/novmm/loader/linux_setup.go:44:9: error: 'struct boot_params' has no member named 'e820_map'
     boot->e820_map[index].addr = start;
         ^
src/novmm/loader/linux_setup.go:45:9: error: 'struct boot_params' has no member named 'e820_map'
     boot->e820_map[index].size = size;
         ^
src/novmm/loader/linux_setup.go:46:9: error: 'struct boot_params' has no member named 'e820_map'
     boot->e820_map[index].type = type;
         ^
```
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants