Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

musl build fails #52

Closed
julio641742 opened this issue Jul 17, 2019 · 1 comment · Fixed by #53
Closed

musl build fails #52

julio641742 opened this issue Jul 17, 2019 · 1 comment · Fixed by #53

Comments

@julio641742
Copy link

I am packaging this software for VoidLinux, so far it builds for every single architecture except for *-musl. It fails because it does not find the error.h header (src/replication.c` line 6) in the musl libc implementation.
Removing that line makes the compiler happy and compiles.

Is this patch good enough?

--- src/replication.c	2019-07-17 15:35:04.329935151 -0700
+++ src/replication.c	2019-07-17 15:44:11.922717037 -0700
@@ -3,7 +3,9 @@
 #include "assert.h"
 #include "configuration.h"
 #include "convert.h"
-#include "error.h"
+#ifdef __GLIBC__
+    #include "error.h"
+#endif
 #include "log.h"
 #include "logging.h"
 #include "membership.h"
@freeekanayaka
Copy link
Contributor

Yes, that looks good. I'm going to prepare a PR myself and merge it. Feel free to open PRs directly next time. Thanks!

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 a pull request may close this issue.

2 participants