-
Notifications
You must be signed in to change notification settings - Fork 477
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
Fix compilation issues on OpenBSD #3661
Conversation
This user does not have permission to start the build. Can one of the admins verify this patch and start the build? |
1 similar comment
This user does not have permission to start the build. Can one of the admins verify this patch and start the build? |
@kira-syslogng ok to test |
Build SUCCESS |
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.
Thanks for the patches.
e516511
to
2004b54
Compare
Build SUCCESS |
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.
Thank you for this pull request!
One thing I noticed is that getent-openbsd.c
is not built, the following lines seem to be missing from our build files:
diff --git a/lib/compat/CMakeLists.txt b/lib/compat/CMakeLists.txt
index 92330189d..2e2511c65 100644
--- a/lib/compat/CMakeLists.txt
+++ b/lib/compat/CMakeLists.txt
@@ -11,6 +11,7 @@ set(COMPAT_HEADERS
compat/pcre.h
compat/getent.h
compat/getent-sun.h
+ compat/getent-openbsd.h
compat/getent-generic.h
compat/un.h
PARENT_SCOPE)
@@ -27,6 +28,7 @@ set(COMPAT_SOURCES
compat/time.c
compat/openssl_support.c
compat/getent-sun.c
+ compat/getent-openbsd.c
compat/getent-generic.c
PARENT_SCOPE)
diff --git a/lib/compat/Makefile.am b/lib/compat/Makefile.am
index d537b3914..968e154fe 100644
--- a/lib/compat/Makefile.am
+++ b/lib/compat/Makefile.am
@@ -17,6 +17,7 @@ compatinclude_HEADERS = \
lib/compat/pcre.h \
lib/compat/getent.h \
lib/compat/getent-sun.h \
+ lib/compat/getent-openbsd.h \
lib/compat/getent-generic.h \
lib/compat/un.h
@@ -32,6 +33,7 @@ compat_sources = \
lib/compat/time.c \
lib/compat/openssl_support.c \
lib/compat/getent-sun.c \
+ lib/compat/getent-openbsd.c \
lib/compat/getent-generic.c
include lib/compat/tests/Makefile.am
I was able to compile this PR with the above Makefile patch on OpenBSD 6.9 (bison 3.7.6 compiled from source, gmake).
diff --git a/lib/compat/getent-openbsd.c b/lib/compat/getent-openbsd.c
index 1b1af9eaf..ca36fb07b 100644
--- a/lib/compat/getent-openbsd.c
+++ b/lib/compat/getent-openbsd.c
@@ -25,6 +25,7 @@
#ifdef __OpenBSD__
#include <errno.h>
+#include <stddef.h>
int
_compat_openbsd__getprotobynumber_r(int proto, |
…okup OpenBSD uses struct protoent_data and struct servent_data to store state information instead of a char buffer with an associated length. Signed-off-by: Todd C. Miller <[email protected]>
OpenBSD intentionally does not support IPv4-mapped IPv6 addresses. Signed-off-by: Todd C. Miller <[email protected]>
OpenBSD supports IP_RECVDSTADDR just like FreeBSD does. Signed-off-by: Todd C. Miller <[email protected]>
On some systems sys/socket.h is implicitly included, but on OpenBSD with LibreSSL it is not. Signed-off-by: Todd C. Miller <[email protected]>
@MrAnno Thanks, I came up with an identical fix for the compilation error. |
Build SUCCESS |
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.
Thank you.
Signed-off-by: László Várady <[email protected]>
This PR fixes the following issues that prevent building syslog-ng on OpenBSD: