Skip to content

Instantly share code, notes, and snippets.

@jilieryuyi
Forked from pcan/README.md
Created February 26, 2019 06:42
Show Gist options
  • Save jilieryuyi/ce8102db1740524eb9b17952fca2d768 to your computer and use it in GitHub Desktop.
Save jilieryuyi/ce8102db1740524eb9b17952fca2d768 to your computer and use it in GitHub Desktop.
Compile Redis with Cygwin

Prerequisites

Install Cygwin with make, gcc & g++. Download Redis tar.gz package, unpack it.

Patch

Edit deps/hiredis/net.c and add the following lines just after the include directives:

/* Cygwin Fix */
#ifdef __CYGWIN__
#define TCP_KEEPCNT 8
#define TCP_KEEPINTVL 150
#define TCP_KEEPIDLE 14400
#endif

Build

Run the following script:

cd deps/
make lua hiredis linenoise

cd ..
make

Credits

Thanks to winse, see this blog entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment