Index: node_modules/node-libcurl/binding.gyp --- node_modules/node-libcurl/binding.gyp.orig 2016-05-11 15:59:07.000000000 +0200 +++ node_modules/node-libcurl/binding.gyp 2016-05-20 22:45:07.032395003 +0200 @@ -64,6 +64,9 @@ 'CURL_STATICLIB' ] }, { # OS != "win" + 'cflags': [ + ' api.md", - "install": "node-pre-gyp install --fallback-to-build", + "install": "node-pre-gyp install --build-from-source", "pregyp": "node-pre-gyp", "test": "mocha test --reporter spec" }, Index: node_modules/node-libcurl/src/Easy.cc --- node_modules/node-libcurl/src/Easy.cc.orig 2016-05-16 16:33:54.000000000 +0200 +++ node_modules/node-libcurl/src/Easy.cc 2016-05-20 22:45:07.032395003 +0200 @@ -30,6 +30,14 @@ #include "make_unique.h" #include "string_format.h" +#include + +template std::string my_to_string(const T& n) { + std::ostringstream stm; + stm << n; + return stm.str(); +} + namespace NodeLibcurl { class Easy::ToFree { @@ -1324,7 +1332,7 @@ if ( code != CURLE_OK ) { - std::string str = std::to_string( static_cast( code ) ); + std::string str = my_to_string( static_cast( code ) ); Nan::ThrowError( str.c_str() ); } @@ -1443,7 +1451,7 @@ Nan::Utf8String msg( tryCatch.Message()->Get() ); std::string errCode = std::string( *msg ); - code = static_cast( std::stoi( errCode ) ); + code = static_cast( atoi(errCode.c_str()) ); } v8::Local ret = Nan::New(); Index: node_modules/node-libcurl/src/string_format.cc --- node_modules/node-libcurl/src/string_format.cc.orig 2015-10-24 22:11:40.000000000 +0200 +++ node_modules/node-libcurl/src/string_format.cc 2016-05-20 22:46:12.242369316 +0200 @@ -1,5 +1,6 @@ #include "string_format.h" +#include #include #include // for va_start, etc #include // for std::unique_ptr Index: node_modules/node-libcurl/tools/curl-config-cflags.js --- node_modules/node-libcurl/tools/curl-config-cflags.js.orig 2016-05-20 22:45:07.032395003 +0200 +++ node_modules/node-libcurl/tools/curl-config-cflags.js 2016-05-20 22:45:07.032395003 +0200 @@ -0,0 +1,14 @@ +var exec = require( 'child_process' ).exec; + + +exec( 'curl-config --cflags', function( error, stdout, stderr ) { + + if ( error != null ) { + console.error( 'Could not run curl-config, please make sure libcurl dev package is installed.' ); + console.error( 'Output: ' + stderr ); + process.exit( 1 ); + } + + console.log( stdout ); + process.exit( 0 ); +});