Skip to content

Conversation

@RebbePod
Copy link
Contributor

@RebbePod RebbePod commented Apr 8, 2025

I am trying to use this as a library for esphome I think this will fix an error I'm getting

../tiny/src/tiny_stack_allocator.c:16:5: error: unknown type name 'max_align_t'
     max_align_t data[max(_size, sizeof(max_align_t)) / sizeof(max_align_t)];          \
     ^~~~~~~~~~~
../tiny/src/tiny_stack_allocator.c:21:1: note: in expansion of macro 'define_worker'
 define_worker(8);
 ^~~~~~~~~~~~~
../tiny/src/tiny_stack_allocator.c:16:40: error: 'max_align_t' undeclared (first use in this function)
     max_align_t data[max(_size, sizeof(max_align_t)) / sizeof(max_align_t)];          \

I am trying to use this as a library for esphome I think this will fix an error I'm getting

```
src/tiny_stack_allocator.c:16:5: error: unknown type name 'max_align_t'
     max_align_t data[max(_size, sizeof(max_align_t)) / sizeof(max_align_t)];```
@ryanplusplus
Copy link
Owner

Thanks!

@ryanplusplus ryanplusplus merged commit 7f820d0 into ryanplusplus:main Apr 8, 2025
5 checks passed
@RebbePod
Copy link
Contributor Author

RebbePod commented Apr 8, 2025

@ryanplusplus It appears that didn't help, any idea why I'm getting that error?

@ryanplusplus
Copy link
Owner

Could be that an older C standard is used. This requires C11. I can rewrite this to not require it.

@RebbePod
Copy link
Contributor Author

RebbePod commented Apr 8, 2025

Ok that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants