summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/config/config.c3
-rw-r--r--src/core/or/connection_edge.c3
-rw-r--r--src/ext/byteorder.h4
-rw-r--r--src/ext/ed25519/donna/ed25519-donna-portable-identify.h2
-rw-r--r--src/ext/trunnel/trunnel.c6
-rw-r--r--src/lib/err/backtrace.c3
-rw-r--r--src/lib/net/inaddr_st.h5
-rw-r--r--src/test/test-memwipe.c4
-rw-r--r--src/test/test_options.c4
9 files changed, 31 insertions, 3 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 4a8f94da0e..c71ed01843 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -131,6 +131,9 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 58aefcf8f2..2ec83c1204 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -139,6 +139,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_NET_PFVAR_H)
#include <net/if.h>
diff --git a/src/ext/byteorder.h b/src/ext/byteorder.h
index c8ba52184b..95e080b14d 100644
--- a/src/ext/byteorder.h
+++ b/src/ext/byteorder.h
@@ -29,6 +29,10 @@
Jean-Philippe Aumasson (https://131002.net/siphash/siphash24.c)
*/
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
/* This code is extracted from csiphash.h */
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
diff --git a/src/ext/ed25519/donna/ed25519-donna-portable-identify.h b/src/ext/ed25519/donna/ed25519-donna-portable-identify.h
index 26a264cf9e..3e0f9cfc50 100644
--- a/src/ext/ed25519/donna/ed25519-donna-portable-identify.h
+++ b/src/ext/ed25519/donna/ed25519-donna-portable-identify.h
@@ -14,7 +14,7 @@
#define OS_OSX
#elif defined(macintosh) || defined(Macintosh)
#define OS_MAC
- #elif defined(__OpenBSD__)
+ #elif defined(OpenBSD)
#define OS_OPENBSD
#endif
#endif
diff --git a/src/ext/trunnel/trunnel.c b/src/ext/trunnel/trunnel.c
index b749d8136f..2442bc3909 100644
--- a/src/ext/trunnel/trunnel.c
+++ b/src/ext/trunnel/trunnel.c
@@ -14,6 +14,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define IS_LITTLE_ENDIAN 1
@@ -31,7 +35,7 @@
# define IS_LITTLE_ENDIAN
# endif
#else
-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(OpenBSD)
# include <sys/endian.h>
# else
# include <endian.h>
diff --git a/src/lib/err/backtrace.c b/src/lib/err/backtrace.c
index d18a595c34..b568c888c5 100644
--- a/src/lib/err/backtrace.c
+++ b/src/lib/err/backtrace.c
@@ -32,6 +32,9 @@
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/lib/net/inaddr_st.h b/src/lib/net/inaddr_st.h
index dc4c6e3a00..a6b7796268 100644
--- a/src/lib/net/inaddr_st.h
+++ b/src/lib/net/inaddr_st.h
@@ -28,6 +28,9 @@
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#ifdef _WIN32
#include <winsock2.h>
@@ -60,7 +63,7 @@ struct in6_addr
/** @{ */
/** Many BSD variants seem not to define these. */
#if defined(__APPLE__) || defined(__darwin__) || \
- defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ defined(__FreeBSD__) || defined(__NetBSD__) || defined(OpenBSD)
#ifndef s6_addr16
#define s6_addr16 __u6_addr.__u6_addr16
#endif
diff --git a/src/test/test-memwipe.c b/src/test/test-memwipe.c
index c879013ed6..b00e854a1c 100644
--- a/src/test/test-memwipe.c
+++ b/src/test/test-memwipe.c
@@ -12,6 +12,10 @@
#include <sys/types.h>
#include <stdlib.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
static unsigned fill_a_buffer_memset(void) __attribute__((noinline));
static unsigned fill_a_buffer_memwipe(void) __attribute__((noinline));
static unsigned fill_a_buffer_nothing(void) __attribute__((noinline));
diff --git a/src/test/test_options.c b/src/test/test_options.c
index f14e620eeb..dd24ff4410 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -23,6 +23,10 @@
#include "test/test_helpers.h"
#include "lib/net/resolve.h"
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
#define NS_MODULE test_options
typedef struct {