SHA256
1
0
forked from pool/libproxy
libproxy/libproxy-gcc47.patch

72 lines
2.6 KiB
Diff

Index: libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp
===================================================================
--- libproxy-0.4.7.orig/libproxy/modules/config_sysconfig.cpp
+++ libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp
@@ -21,6 +21,9 @@
#include <cstdlib>
#include <map>
#include <fstream>
+#include <unistd.h>
+#include <sys/types.h>
+
#include "../extension_config.hpp"
using namespace libproxy;
Index: libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp
===================================================================
--- libproxy-0.4.7.orig/libproxy/modules/pacrunner_mozjs.cpp
+++ libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp
@@ -18,6 +18,7 @@
******************************************************************************/
#include <cstring> // ?
+#include <unistd.h> // gethostname
#include "../extension_pacrunner.hpp"
using namespace libproxy;
@@ -85,7 +86,7 @@ static JSBool myIpAddress(JSContext *cx,
if (!gethostname(hostname, 1023)) {
JSString *myhost = JS_NewStringCopyN(cx, hostname, strlen(hostname));
jsval arg = STRING_TO_JSVAL(myhost);
- return dnsResolve_(cx, 1, &arg);
+ return dnsResolve_(cx, arg, vp);
}
JS_free(cx, hostname);
JS_SET_RVAL(cx, vp, JSVAL_NULL);
Index: libproxy-0.4.7/libproxy/modules/pacrunner_natus.cpp
===================================================================
--- libproxy-0.4.7.orig/libproxy/modules/pacrunner_natus.cpp
+++ libproxy-0.4.7/libproxy/modules/pacrunner_natus.cpp
@@ -18,6 +18,7 @@
******************************************************************************/
#include "../extension_pacrunner.hpp"
+#include <unistd.h> // gethostname
using namespace libproxy;
#define I_ACKNOWLEDGE_THAT_NATUS_IS_NOT_STABLE
Index: libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp
===================================================================
--- libproxy-0.4.7.orig/libproxy/modules/pacrunner_webkit.cpp
+++ libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp
@@ -18,6 +18,7 @@
******************************************************************************/
#include "../extension_pacrunner.hpp"
+#include <unistd.h> // gethostname
using namespace libproxy;
#ifdef __APPLE__
Index: libproxy-0.4.7/libproxy/url.cpp
===================================================================
--- libproxy-0.4.7.orig/libproxy/url.cpp
+++ libproxy-0.4.7/libproxy/url.cpp
@@ -33,6 +33,7 @@
#include <cstdlib> // For atoi()
#include <sys/stat.h> // For stat()
#include <algorithm> // For transform()
+#include <unistd.h> // For read() close()
#ifdef WIN32
#include <io.h>