flb_libco: Add support to build on Apple Silicon#340
Open
areese wants to merge 3 commits into
Open
Conversation
Add a check for posix_memalign in stdlib.h as this wasn't detected on M1 causing a _memalign missing symbol Do not include malloc.h if __APPLE__ is defined
Author
Swap from nested #ifndef to #if/#elif/#else which is more readable. #include <malloc_np.h> on FreeBSD
Author
|
@unrelentingtech |
areese
pushed a commit
to areese/fluent-bit
that referenced
this pull request
Jun 8, 2021
1. try detecting HAVE_POSIX_MEMALIGN in malloc_np for FreeBSD 2. Use if/elif/else for the defines in aarch64.c
Contributor
|
Yes, that does work. Instead of using platform ifdefs though, maybe provide different defines like |
Author
|
We can do that. |
…NP which are more clear about what is going on
Author
|
@unrelentingtech fixed here, I'll fix the other pr as well. |
areese
pushed a commit
to areese/fluent-bit
that referenced
this pull request
Jun 8, 2021
This patch adds support for fluent-bit to build on M1/Apple Silicon Update to reflect the changes in monkey/monkey#340 1. try detecting HAVE_POSIX_MEMALIGN in malloc_np for FreeBSD 2. Use if/elif/else for the defines in aarch64.c Use HAVE_POSIX_MEMALIGN_IN_STDLIB and HAVE_POSIX_MEMALIGN_IN_PTHREAD_NP which are more clear about what is going on Signed-off-by: Allen Reese <areese999@apple.com>
areese
pushed a commit
to areese/fluent-bit
that referenced
this pull request
Jun 8, 2021
This patch adds support for fluent-bit to build on M1/Apple Silicon This is upstreamed at monkey/monkey#340 Signed-off-by: Allen Reese <areese999@apple.com>
edsiper
pushed a commit
to edsiper/flb_libco
that referenced
this pull request
Dec 18, 2021
This patch adds support for fluent-bit to build on M1/Apple Silicon Update to reflect the changes in monkey/monkey#340 1. try detecting HAVE_POSIX_MEMALIGN in malloc_np for FreeBSD 2. Use if/elif/else for the defines in aarch64.c Use HAVE_POSIX_MEMALIGN_IN_STDLIB and HAVE_POSIX_MEMALIGN_IN_PTHREAD_NP which are more clear about what is going on Signed-off-by: Allen Reese <areese999@apple.com> Signed-off-by: Eduardo Silva <eduardo@calyptia.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a check for posix_memalign in stdlib.h as this wasn't detected on M1 causing a _memalign missing symbol
Do not include malloc.h if APPLE is defined