diff options
author | Ollivier Robert <roberto@FreeBSD.org> | 2013-12-04 21:33:17 +0000 |
---|---|---|
committer | Ollivier Robert <roberto@FreeBSD.org> | 2013-12-04 21:33:17 +0000 |
commit | 2b45e011ca352ce509bc83ae148230aeee0c7e0d (patch) | |
tree | a618007bb41d13153794a598e3d904ace2976324 /include/ntp_string.h | |
parent | 9b5bd0a264b0a21eefac2b929b574c73bd601507 (diff) | |
download | src-5592cd9e3002995d676cc186b0362f891fead9fc.tar.gz src-5592cd9e3002995d676cc186b0362f891fead9fc.zip |
Virgin import of ntpd 4.2.6p5.vendor/ntp/4.2.6p5
When the series of commits is complete, things like
https://cert.litnet.lt/en/docs/ntp-distributed-reflection-dos-attacks
should be fixed.
PR: bin/148836 (except that we import a newer version)
Asked by: Too many
MFC after: 2 weeks
Diffstat (limited to 'include/ntp_string.h')
-rw-r--r-- | include/ntp_string.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/ntp_string.h b/include/ntp_string.h index f7f0092ae493..aab7084b0536 100644 --- a/include/ntp_string.h +++ b/include/ntp_string.h @@ -36,13 +36,20 @@ char *strchr(), *strrchr(); #endif /* STDC_HEADERS */ #ifdef NTP_NEED_BOPS -# define memcmp(a,b,c) bcmp(a,b,(int)c) -# define memmove(t,f,c) bcopy(f,t,(int)c) -# define memcpy(t,f,c) bcopy(f,t,(int)c) -# define memset(a,x,c) if (x == 0x00) bzero(a,(int)c); else ntp_memset((char*)a,x,c) -void ntp_memset P((char *, int, int)); +#ifdef HAVE_STRINGS_H +# include <strings.h> /* bcmp, bcopy, bzero */ +#endif + +void ntp_memset (char *, int, int); +#define memcmp(a, b, c) bcmp(a, b, (int)(c)) +#define memmove(t, f, c) bcopy(f, t, (int)(c)) +#define memcpy(t, f, c) bcopy(f, t, (int)(c)) +#define memset(a, x, c) if (0 == (x)) \ + bzero(a, (int)(c)); \ + else \ + ntp_memset((char *)(a), x, c) #endif /* NTP_NEED_BOPS */ #endif /* _ntp_string_h */ |