misc: fix a few issues on MidnightBSD

Closes #7812
This commit is contained in:
Lucas Holt 2021-10-04 17:15:07 -04:00 committed by Daniel Stenberg
parent 5ce380d65a
commit 18480f71be
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
5 changed files with 13 additions and 7 deletions

View File

@ -2027,8 +2027,8 @@ dnl regarding the paths this will scan:
dnl /etc/ssl/certs/ca-certificates.crt Debian systems
dnl /etc/pki/tls/certs/ca-bundle.crt Redhat and Mandriva
dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat
dnl /usr/local/share/certs/ca-root-nss.crt FreeBSD
dnl /etc/ssl/cert.pem OpenBSD, FreeBSD (symlink)
dnl /usr/local/share/certs/ca-root-nss.crt FreeBSD, MidnightBSD
dnl /etc/ssl/cert.pem OpenBSD, FreeBSD, MidnightBSD (symlink)
dnl /etc/ssl/certs/ (ca path) SUSE
AC_DEFUN([CURL_CHECK_CA_BUNDLE], [

View File

@ -46,8 +46,8 @@
#include <stdio.h>
#include <limits.h>
#if defined(__FreeBSD__) && (__FreeBSD__ >= 2)
/* Needed for __FreeBSD_version symbol definition */
#if (defined(__FreeBSD__) && (__FreeBSD__ >= 2)) || defined(__MidnightBSD__)
/* Needed for __FreeBSD_version or __MidnightBSD_version symbol definition */
#include <osreldate.h>
#endif
@ -73,6 +73,7 @@
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
(defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
defined(__VXWORKS__)
#include <sys/select.h>
#endif

View File

@ -2050,6 +2050,10 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
dnl hpux 11.11 and newer
tst_tsafe_getaddrinfo="yes"
;;
midnightbsd*)
dnl all MidnightBSD versions
tst_tsafe_getaddrinfo="yes"
;;
netbsd[[123]].*)
dnl netbsd 3.X and older
tst_tsafe_getaddrinfo="no"

View File

@ -119,7 +119,7 @@ if test "x$xc_lt_want_with_pic" = 'xdefault'; then
case $host_cpu in @%:@ (
x86_64 | amd64 | ia64)
case $host_os in @%:@ (
linux* | freebsd*)
linux* | freebsd* | midnightbsd*)
xc_lt_want_with_pic='yes'
;;
esac

View File

@ -24,7 +24,8 @@
#ifdef HAVE_FSETXATTR
# include <sys/xattr.h> /* header from libc, not from libattr */
# define USE_XATTR
#elif defined(__FreeBSD_version) && (__FreeBSD_version > 500000)
#elif (defined(__FreeBSD_version) && (__FreeBSD_version > 500000)) || \
defined(__MidnightBSD_version)
# include <sys/types.h>
# include <sys/extattr.h>
# define USE_XATTR
@ -111,7 +112,7 @@ int fwrite_xattr(CURL *curl, int fd)
err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
#elif defined(HAVE_FSETXATTR_5)
err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
#elif defined(__FreeBSD_version)
#elif defined(__FreeBSD_version) || defined(__MidnightBSD_version)
{
ssize_t rc = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER,
mappings[i].attr, value, strlen(value));