summaryrefslogtreecommitdiffhomepage
path: root/auto/sockets
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-12-01 18:06:38 +0300
committerMax Romanov <max.romanov@nginx.com>2021-12-01 18:06:38 +0300
commitc6c74d117dee5ac747ae53ce7a1e75bb2b7470e1 (patch)
tree2b25518dec0bd881327ec006613ea2c2dd56edf2 /auto/sockets
parent64db3ef1bbf32457aefb002b9fecabb6c07923f9 (diff)
downloadunit-c6c74d117dee5ac747ae53ce7a1e75bb2b7470e1.tar.gz
unit-c6c74d117dee5ac747ae53ce7a1e75bb2b7470e1.tar.bz2
Disabling SCM_CREDS usage on DragonFly BSD.
DragonFly BSD supports SCM_CREDS and SCM_RIGHTS, but only the first control message is passed correctly while the second one isn't processed by the kernel. This closes #599 issue on GitHub.
Diffstat (limited to 'auto/sockets')
-rw-r--r--auto/sockets62
1 files changed, 32 insertions, 30 deletions
diff --git a/auto/sockets b/auto/sockets
index 1b6b4368..e6ef326d 100644
--- a/auto/sockets
+++ b/auto/sockets
@@ -166,51 +166,53 @@ if [ $nxt_found = no ]; then
fi
-nxt_feature="sockopt SO_PASSCRED"
-nxt_feature_name=NXT_HAVE_SOCKOPT_SO_PASSCRED
-nxt_feature_run=
-nxt_feature_incs=
-nxt_feature_libs=
-nxt_feature_test="#define _GNU_SOURCE
- #include <sys/socket.h>
+if [ $NXT_SYSTEM != DragonFly ]; then
+ nxt_feature="sockopt SO_PASSCRED"
+ nxt_feature_name=NXT_HAVE_SOCKOPT_SO_PASSCRED
+ nxt_feature_run=
+ nxt_feature_incs=
+ nxt_feature_libs=
+ nxt_feature_test="#define _GNU_SOURCE
+ #include <sys/socket.h>
- int main() {
- return SO_PASSCRED == 0;
- }"
-. auto/feature
+ int main() {
+ return SO_PASSCRED == 0;
+ }"
+ . auto/feature
-if [ $nxt_found = yes ]; then
- nxt_feature="struct ucred"
- nxt_feature_name=NXT_HAVE_UCRED
+ if [ $nxt_found = yes ]; then
+ nxt_feature="struct ucred"
+ nxt_feature_name=NXT_HAVE_UCRED
+ nxt_feature_run=
+ nxt_feature_incs=
+ nxt_feature_libs=
+ nxt_feature_test="#define _GNU_SOURCE
+ #include <sys/socket.h>
+ #include <sys/un.h>
+
+ int main() {
+ return sizeof(struct ucred);
+ }"
+ . auto/feature
+ fi
+
+
+ nxt_feature="struct cmsgcred"
+ nxt_feature_name=NXT_HAVE_MSGHDR_CMSGCRED
nxt_feature_run=
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#define _GNU_SOURCE
#include <sys/socket.h>
- #include <sys/un.h>
int main() {
- return sizeof(struct ucred);
+ return sizeof(struct cmsgcred);
}"
. auto/feature
fi
-nxt_feature="struct cmsgcred"
-nxt_feature_name=NXT_HAVE_MSGHDR_CMSGCRED
-nxt_feature_run=
-nxt_feature_incs=
-nxt_feature_libs=
-nxt_feature_test="#define _GNU_SOURCE
- #include <sys/socket.h>
-
- int main() {
- return sizeof(struct cmsgcred);
- }"
-. auto/feature
-
-
nxt_feature="sys/filio.h"
nxt_feature_name=NXT_HAVE_SYS_FILIO_H
nxt_feature_run=