mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
Fix a compile warning with zlib 1.2.4 and 1.2.5
I took this fix from Tor (commit 1a52e39c22d5, author Nick Mathewson, Copyright (c) 2007-2011, The Tor Project, Inc.) and adapted it slightly for libevent.
This commit is contained in:
parent
66193853fd
commit
5786b91e2e
@ -46,7 +46,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <zlib.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
|
||||
@ -58,6 +57,28 @@
|
||||
|
||||
#include "regress.h"
|
||||
|
||||
/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
|
||||
saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory
|
||||
that nobody will care if the compile outputs a no-such-identifier warning.
|
||||
|
||||
Sorry, but we like -Werror over here, so I guess we need to define these.
|
||||
I hope that zlib 1.2.6 doesn't break these too.
|
||||
*/
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE 0
|
||||
#endif
|
||||
#ifndef _LFS64_LARGEFILE
|
||||
#define _LFS64_LARGEFILE 0
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 0
|
||||
#endif
|
||||
#ifndef off64_t
|
||||
#define off64_t ev_int64_t
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
static int infilter_calls;
|
||||
static int outfilter_calls;
|
||||
static int readcb_finished;
|
||||
|
Loading…
x
Reference in New Issue
Block a user