mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
95e2455cdb
Some of our unit tests and sample code need functions and structures defined in an -internal.h header. But that can freak out OpenSolaris, where stdio.h wants to define _FILE_OFFSET_BITS unless it's already defined, and then evconfig-internal.h defines it. Regular users should never ever use our -internal.h headers, so the solution is to make sure that if we're going to use them ourselves, we do so before system headers.
13 lines
170 B
C
13 lines
170 B
C
|
|
#include "util-internal.h"
|
|
#ifdef _WIN32
|
|
#include <winsock2.h>
|
|
#endif
|
|
|
|
#include "event2/util.h"
|
|
|
|
#ifdef snprintf
|
|
#undef snprintf
|
|
#endif
|
|
#define snprintf evutil_snprintf
|