From 85be496b9944ba8f8f7f3e91b3e3ac21fe71c053 Mon Sep 17 00:00:00 2001 From: kbyanc Date: Wed, 8 May 2002 01:08:26 +0000 Subject: Roll my own min() (named ISO88025_MIN() so as to not cause conflicts) so that this header may be included from userland where min() may not be declared (or worse, declared differently). I open to alternative solutions. --- sys/net/iso88025.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/net/iso88025.h') diff --git a/sys/net/iso88025.h b/sys/net/iso88025.h index aad8d54..1c38b91 100644 --- a/sys/net/iso88025.h +++ b/sys/net/iso88025.h @@ -114,9 +114,11 @@ struct iso88025_sockaddr_dl_data { u_short *trld_route[RIF_MAX_LEN]; }; +#define ISO88025_MIN(a, b) (((a)<(b))?(a):(b)) #define SDL_ISO88025(s) ((struct iso88025_sockaddr_dl_data *) \ - ((s)->sdl_data + min((s)->sdl_nlen + \ - (s)->sdl_alen + (s)->sdl_slen, 12))) + ((s)->sdl_data + \ + ISO88025_MIN((s)->sdl_nlen + (s)->sdl_alen + \ + (s)->sdl_slen, 12))) /* * Structure of a 48-bit iso 802.5 address. -- cgit v1.1