summaryrefslogtreecommitdiffstats
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-04-08 05:25:57 +0200
committerDarren Tucker <dtucker@dtucker.net>2021-04-08 05:25:57 +0200
commit80032102d05e866dc2a48a5caf760cf42c2e090e (patch)
tree603033b0b96511b4fa830660a0cc8e6f502bd786 /openbsd-compat
parentRemove only use of warn(). (diff)
downloadopenssh-80032102d05e866dc2a48a5caf760cf42c2e090e.tar.xz
openssh-80032102d05e866dc2a48a5caf760cf42c2e090e.zip
ifdef out MIN and MAX.
In -portable, defines.h ensures that these are defined, so redefining potentially causes a warning. We don't just delete it to make any future code syncs a little but easier. bz#3293.
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/memmem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsd-compat/memmem.c b/openbsd-compat/memmem.c
index ac1243eb0..ad330d1a8 100644
--- a/openbsd-compat/memmem.c
+++ b/openbsd-compat/memmem.c
@@ -61,8 +61,11 @@ fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n)
return hw == nw ? (char *)h-4 : 0;
}
+#if 0
+/* In -portable, defines.h ensures that these are already defined. */
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
+#endif
#define BITOP(a,b,op) \
((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a))))