mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Fix duplicate definition of typedef 'bufchain'.
This was defined in misc.h, and also in network.h (because one function prototype needed to refer to it in the latter), leading to a build failure if any source file inconveniently included both those headers. Fixed by guarding each copy of the typedef with a #ifdef.
This commit is contained in:
parent
2c37bfca42
commit
0ac3526b3e
8
misc.h
8
misc.h
@ -59,10 +59,14 @@ void base64_encode_atom(const unsigned char *data, int n, char *out);
|
|||||||
int base64_decode_atom(const char *atom, unsigned char *out);
|
int base64_decode_atom(const char *atom, unsigned char *out);
|
||||||
|
|
||||||
struct bufchain_granule;
|
struct bufchain_granule;
|
||||||
typedef struct bufchain_tag {
|
struct bufchain_tag {
|
||||||
struct bufchain_granule *head, *tail;
|
struct bufchain_granule *head, *tail;
|
||||||
int buffersize; /* current amount of buffered data */
|
int buffersize; /* current amount of buffered data */
|
||||||
} bufchain;
|
};
|
||||||
|
#ifndef BUFCHAIN_TYPEDEF
|
||||||
|
typedef struct bufchain_tag bufchain; /* rest of declaration in misc.c */
|
||||||
|
#define BUFCHAIN_TYPEDEF
|
||||||
|
#endif
|
||||||
|
|
||||||
void bufchain_init(bufchain *ch);
|
void bufchain_init(bufchain *ch);
|
||||||
void bufchain_clear(bufchain *ch);
|
void bufchain_clear(bufchain *ch);
|
||||||
|
@ -229,7 +229,10 @@ Socket new_error_socket(const char *errmsg, Plug plug);
|
|||||||
void backend_socket_log(void *frontend, int type, SockAddr addr, int port,
|
void backend_socket_log(void *frontend, int type, SockAddr addr, int port,
|
||||||
const char *error_msg, int error_code, Conf *conf,
|
const char *error_msg, int error_code, Conf *conf,
|
||||||
int session_started);
|
int session_started);
|
||||||
|
#ifndef BUFCHAIN_TYPEDEF
|
||||||
typedef struct bufchain_tag bufchain; /* rest of declaration in misc.c */
|
typedef struct bufchain_tag bufchain; /* rest of declaration in misc.c */
|
||||||
|
#define BUFCHAIN_TYPEDEF
|
||||||
|
#endif
|
||||||
void log_proxy_stderr(Plug plug, bufchain *buf, const void *vdata, int len);
|
void log_proxy_stderr(Plug plug, bufchain *buf, const void *vdata, int len);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user