-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tree wide: compilation fixes for native64
on musl systems
#20730
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
be387a2
sys/posix: Don't shadow <sys/select.h> on native
maribu 1582fdd
drivers/at25xxx: s/PAGE_SIZE/AT25_PAGE_SIZE/
maribu 70f5747
core/native_shed: Fix compilation with musl
maribu 2115169
cpu/native: Fix C11 atomic sizes for musl
maribu 54702a5
examples/dtls-wolfssl: Sort Makefile.ci
maribu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
#define min(a, b) ((a) > (b) ? (b) : (a)) | ||
#endif | ||
|
||
#define PAGE_SIZE (dev->params.page_size) | ||
#define AT25_PAGE_SIZE (dev->params.page_size) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haha! 😸 |
||
#define ADDR_LEN (AT25XXX_PARAM_ADDR_LEN) | ||
#define ADDR_MSK ((1UL << ADDR_LEN) - 1) | ||
|
||
|
@@ -83,14 +83,14 @@ | |
return tries == 0 ? -ETIMEDOUT : 0; | ||
} | ||
|
||
static int _at25xxx_write_page(const at25xxx_t *dev, uint32_t page, uint32_t offset, const void *data, size_t len) | ||
{ | ||
assert(offset < PAGE_SIZE); | ||
assert(offset < AT25_PAGE_SIZE); | ||
|
||
/* write no more than to the end of the current page to prevent wrap-around */ | ||
size_t remaining = PAGE_SIZE - offset; | ||
size_t remaining = AT25_PAGE_SIZE - offset; | ||
len = min(len, remaining); | ||
uint32_t pos = _pos(CMD_WRITE, page * PAGE_SIZE + offset); | ||
uint32_t pos = _pos(CMD_WRITE, page * AT25_PAGE_SIZE + offset); | ||
|
||
/* wait for previous write to finish - may take up to 5 ms */ | ||
int res = _wait_until_eeprom_ready(dev); | ||
|
@@ -115,7 +115,7 @@ | |
return len; | ||
} | ||
|
||
int at25xxx_write_page(const at25xxx_t *dev, uint32_t page, uint32_t offset, const void *data, size_t len) | ||
{ | ||
int res; | ||
|
||
|
@@ -136,8 +136,8 @@ | |
} | ||
|
||
/* page size is always a power of two */ | ||
const uint32_t page_shift = bitarithm_msb(PAGE_SIZE); | ||
const uint32_t page_mask = PAGE_SIZE - 1; | ||
const uint32_t page_shift = bitarithm_msb(AT25_PAGE_SIZE); | ||
const uint32_t page_mask = AT25_PAGE_SIZE - 1; | ||
|
||
uint32_t page = pos >> page_shift; | ||
uint32_t offset = pos & page_mask; | ||
|
@@ -214,8 +214,8 @@ | |
memset(data, val, sizeof(data)); | ||
|
||
/* page size is always a power of two */ | ||
const uint32_t page_shift = bitarithm_msb(PAGE_SIZE); | ||
const uint32_t page_mask = PAGE_SIZE - 1; | ||
const uint32_t page_shift = bitarithm_msb(AT25_PAGE_SIZE); | ||
const uint32_t page_mask = AT25_PAGE_SIZE - 1; | ||
|
||
uint32_t page = pos >> page_shift; | ||
uint32_t offset = pos & page_mask; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker for this PR but why is there no
#elseif __musl__ ...
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In musl those are already provided (causing the conflict).