diff options
author | Cy Schubert <cy@FreeBSD.org> | 2015-04-10 01:26:02 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2015-04-10 01:26:02 +0000 |
commit | 4ba32eb5a8bf3455c09d1513ed2af8d2c861a6ba (patch) | |
tree | f0f951897eebdd4e1fe1c8d47d866fa6c128828d /sntp/libevent/evbuffer-internal.h | |
parent | f7cba3a80d9ebefc57776fffd17a4ae68f72e494 (diff) | |
download | src-4ba32eb5a8bf3455c09d1513ed2af8d2c861a6ba.tar.gz src-4ba32eb5a8bf3455c09d1513ed2af8d2c861a6ba.zip |
Vendor import ntp 4.2.8p2vendor/ntp/4.2.8p2
Approved by: delphij
Security: CVE-2015-1798, CVE-2015-1799
Security: VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
Notes
Notes:
svn path=/vendor/ntp/dist/; revision=281348
svn path=/vendor/ntp/4.2.8p2/; revision=281349; tag=vendor/ntp/4.2.8p2
Diffstat (limited to 'sntp/libevent/evbuffer-internal.h')
-rw-r--r-- | sntp/libevent/evbuffer-internal.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sntp/libevent/evbuffer-internal.h b/sntp/libevent/evbuffer-internal.h index fb67ec095725..cf4bddc80ea8 100644 --- a/sntp/libevent/evbuffer-internal.h +++ b/sntp/libevent/evbuffer-internal.h @@ -155,6 +155,18 @@ struct evbuffer { struct bufferevent *parent; }; +#if EVENT__SIZEOF_OFF_T < EVENT__SIZEOF_SIZE_T +typedef ev_ssize_t ev_misalign_t; +#define EVBUFFER_CHAIN_MAX ((size_t)EV_SSIZE_MAX) +#else +typedef ev_off_t ev_misalign_t; +#if EVENT__SIZEOF_OFF_T > EVENT__SIZEOF_SIZE_T +#define EVBUFFER_CHAIN_MAX EV_SIZE_MAX +#else +#define EVBUFFER_CHAIN_MAX ((size_t)EV_SSIZE_MAX) +#endif +#endif + /** A single item in an evbuffer. */ struct evbuffer_chain { /** points to next buffer in the chain */ @@ -165,7 +177,7 @@ struct evbuffer_chain { /** unused space at the beginning of buffer or an offset into a * file for sendfile buffers. */ - ev_off_t misalign; + ev_misalign_t misalign; /** Offset into buffer + misalign at which to start writing. * In other words, the total number of bytes actually stored |