mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 14:40:51 +01:00
Fix windows compile
svn:r1757
This commit is contained in:
parent
908ccb9dcd
commit
6fa2ded74c
3 changed files with 3 additions and 12 deletions
|
@ -171,9 +171,6 @@ void buf_free(buf_t *buf) {
|
|||
int read_to_buf(int s, size_t at_most, buf_t *buf, int *reached_eof) {
|
||||
|
||||
int read_result;
|
||||
#ifdef MS_WINDOWS
|
||||
int e;
|
||||
#endif
|
||||
|
||||
assert_buf_ok(buf);
|
||||
tor_assert(reached_eof && (s>=0));
|
||||
|
@ -244,9 +241,6 @@ int flush_buf(int s, buf_t *buf, int *buf_flushlen)
|
|||
* return -1 or how many bytes you just flushed */
|
||||
|
||||
int write_result;
|
||||
#ifdef MS_WINDOWS
|
||||
int e;
|
||||
#endif
|
||||
|
||||
assert_buf_ok(buf);
|
||||
tor_assert(buf_flushlen && (s>=0) && ((unsigned)*buf_flushlen <= buf->datalen));
|
||||
|
|
|
@ -279,13 +279,13 @@ int connection_create_listener(char *bindaddress, uint16_t bindport, int type) {
|
|||
|
||||
if(bind(s,(struct sockaddr *)&bindaddr,sizeof(bindaddr)) < 0) {
|
||||
log_fn(LOG_WARN,"Could not bind to port %u: %s",bindport,
|
||||
strerror(tor_socket_errno()));
|
||||
strerror(tor_socket_errno(s)));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(listen(s,SOMAXCONN) < 0) {
|
||||
log_fn(LOG_WARN,"Could not listen on port %u: %s",bindport,
|
||||
strerror(tor_socket_errno()));
|
||||
strerror(tor_socket_errno(s)));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -313,9 +313,6 @@ static int connection_handle_listener_read(connection_t *conn, int new_type) {
|
|||
connection_t *newconn;
|
||||
struct sockaddr_in remote; /* information about the remote peer when connecting to other routers */
|
||||
int remotelen = sizeof(struct sockaddr_in); /* length of the remote address */
|
||||
#ifdef MS_WINDOWS
|
||||
int e;
|
||||
#endif
|
||||
|
||||
news = accept(conn->s,(struct sockaddr *)&remote,&remotelen);
|
||||
if (news == -1) { /* accept() error */
|
||||
|
|
|
@ -190,4 +190,4 @@ ine to the address where bug reports for this package should be sent. */
|
|||
#define UNALIGNED_INT_ACCESS_OK
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.0.6rc2"
|
||||
#define VERSION "0.0.6rc3"
|
||||
|
|
Loading…
Add table
Reference in a new issue