Skip to content
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

Guard glibc-specific functions using __GLIBC__ define #342

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Jolmberg
Copy link
Contributor

Hi! I've been compiling and running quicer on alpine, but recent versions no longer compile. I'm a little bit out of my depth here but it seems to be because alpine uses musl instead of glibc and is missing the malloc_trim and malloc_stats functions. These are already protected by the linux define so I'm wondering if you would consider changing that to GLIBC instead.

@qzhuyan
Copy link
Collaborator

qzhuyan commented Jan 28, 2025

@Jolmberg thanks for the PR.

Could you fix the formatting and update your branch?

diff --git a/c_src/quicer_nif.c b/c_src/quicer_nif.c
index 0b5b658..6b45bd7 100644
--- a/c_src/quicer_nif.c
+++ b/c_src/quicer_nif.c
@@ -16,8 +16,8 @@ limitations under the License.
 
 #include "quicer_nif.h"
 
-#include <features.h>
 #include <dlfcn.h>
+#include <features.h>
 
 #include "quicer_listener.h"
 #include "quicer_vsn.h"

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13008521985

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 86.366%

Files with Coverage Reduction New Missed Lines %
c_src/quicer_config.c 4 87.48%
Totals Coverage Status
Change from base Build 12864933244: 0.06%
Covered Lines: 4092
Relevant Lines: 4738

💛 - Coveralls

@qzhuyan
Copy link
Collaborator

qzhuyan commented Jan 28, 2025

thanks for the PR, I will fix the macOS build in a followup.

@qzhuyan qzhuyan merged commit 97dc97b into emqx:main Jan 28, 2025
45 of 51 checks passed
@Jolmberg
Copy link
Contributor Author

Thank you!

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.

3 participants