diff options
author | Lucas Holt <luke@foolishgames.com> | 2021-10-04 17:15:07 -0400 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-10-05 08:35:24 +0200 |
commit | 18480f71be0685ee6becaa85c762c6b7956a2402 (patch) | |
tree | 3f20a0801f4b3dd6bcbd12d45653e18aaa0f54ad | |
parent | 5ce380d65a183f6d9358c3c4df71a880fcf5c736 (diff) | |
download | curl-18480f71be0685ee6becaa85c762c6b7956a2402.tar.gz |
misc: fix a few issues on MidnightBSD
Closes #7812
-rw-r--r-- | acinclude.m4 | 4 | ||||
-rw-r--r-- | include/curl/curl.h | 5 | ||||
-rw-r--r-- | m4/curl-functions.m4 | 4 | ||||
-rw-r--r-- | m4/xc-lt-iface.m4 | 2 | ||||
-rw-r--r-- | src/tool_xattr.c | 5 |
5 files changed, 13 insertions, 7 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 0e86bcd06..feb9e818f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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], [ diff --git a/include/curl/curl.h b/include/curl/curl.h index d0862afaf..fb33eeb15 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -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 diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index b21bbd1e2..575454d44 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -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" diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4 index 465767fc3..8cec91098 100644 --- a/m4/xc-lt-iface.m4 +++ b/m4/xc-lt-iface.m4 @@ -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 diff --git a/src/tool_xattr.c b/src/tool_xattr.c index 08e92fa50..76ee52482 100644 --- a/src/tool_xattr.c +++ b/src/tool_xattr.c @@ -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)); |