Skip to content

Commit

Permalink
Merge pull request #212 from shadowsocks/v2.0.4-int
Browse files Browse the repository at this point in the history
Refine mingw compatibility
  • Loading branch information
madeye committed Jan 11, 2015
2 parents 27b60ce + dfb4b3b commit 9cdc3dc
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It is a port of [shadowsocks](https://github.com/shadowsocks/shadowsocks)
created by [@clowwindy](https://github.com/clowwindy) maintained by
[@madeye](https://github.com/madeye) and [@linusyang](https://github.com/linusyang).

Current version: 2.0.3 | [![Build Status](https://travis-ci.org/shadowsocks/shadowsocks-libev.png?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-libev) | [Changelog](Changes)
Current version: 2.0.4 | [![Build Status](https://travis-ci.org/shadowsocks/shadowsocks-libev.png?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-libev) | [Changelog](Changes)

Features
--------
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for shadowsocks-libev 2.0.3.
# Generated by GNU Autoconf 2.69 for shadowsocks-libev 2.0.4.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='shadowsocks-libev'
PACKAGE_TARNAME='shadowsocks-libev'
PACKAGE_VERSION='2.0.3'
PACKAGE_STRING='shadowsocks-libev 2.0.3'
PACKAGE_VERSION='2.0.4'
PACKAGE_STRING='shadowsocks-libev 2.0.4'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -1336,7 +1336,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures shadowsocks-libev 2.0.3 to adapt to many kinds of systems.
\`configure' configures shadowsocks-libev 2.0.4 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1407,7 +1407,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of shadowsocks-libev 2.0.3:";;
short | recursive ) echo "Configuration of shadowsocks-libev 2.0.4:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1528,7 +1528,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
shadowsocks-libev configure 2.0.3
shadowsocks-libev configure 2.0.4
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2051,7 +2051,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by shadowsocks-libev $as_me 2.0.3, which was
It was created by shadowsocks-libev $as_me 2.0.4, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -2872,7 +2872,7 @@ fi

# Define the identity of the package.
PACKAGE='shadowsocks-libev'
VERSION='2.0.3'
VERSION='2.0.4'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -15636,7 +15636,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by shadowsocks-libev $as_me 2.0.3, which was
This file was extended by shadowsocks-libev $as_me 2.0.4, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -15702,7 +15702,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
shadowsocks-libev config.status 2.0.3
shadowsocks-libev config.status 2.0.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ([2.67])
AC_INIT([shadowsocks-libev], [2.0.3], [[email protected]])
AC_INIT([shadowsocks-libev], [2.0.4], [[email protected]])
AC_CONFIG_SRCDIR([src/encrypt.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(auto)
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
shadowsocks-libev (2.0.4-1) unstable; urgency=low

* Fix building issues with MinGW32.

-- Max Lv <[email protected]> Sun, 11 Jan 2015 13:33:31 +0900

shadowsocks-libev (2.0.3-1) unstable; urgency=high

* Fix some issues.
Expand Down
2 changes: 2 additions & 0 deletions libudns/udns_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ static void dns_set_srch_internal(struct dns_ctx *ctx, char *srch) {

#ifdef __MINGW32__

#define NO_IPHLPAPI

#ifndef NO_IPHLPAPI
/* Apparently, some systems does not have proper headers for IPHLPAIP to work.
* The best is to upgrade headers, but here's another, ugly workaround for
Expand Down
2 changes: 1 addition & 1 deletion openwrt/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=shadowsocks-libev
PKG_VERSION:=2.0.3
PKG_VERSION:=2.0.4
PKG_RELEASE=$(PKG_SOURCE_VERSION)

PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/archive
Expand Down
3 changes: 2 additions & 1 deletion shadowsocks-libev.8
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ Use a configuration file.
Run as a specific user.
.TP
.B \-d \fIaddr\fP
Setup the name servers for libudns. The default server is 8.8.8.8.
Setup the name servers for libudns. The default server is fetched from
/etc/resolv.conf.
.TP
.B \-u
Enable UDP relay.
Expand Down
8 changes: 7 additions & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,15 @@ int main(int argc, char **argv)

// setup udns
if (nameserver_num == 0) {
#ifdef __MINGW32__
nameservers[nameserver_num++] = "8.8.8.8";
resolv_init(loop, nameservers, nameserver_num);
#else
resolv_init(loop, NULL, 0);
#endif
} else {
resolv_init(loop, nameservers, nameserver_num);
}
resolv_init(loop, nameservers, nameserver_num);

// inilitialize listen context
struct listen_ctx listen_ctx_list[server_num];
Expand Down

0 comments on commit 9cdc3dc

Please sign in to comment.