cjdns/cjdns.libuv.patch

113 lines
4.2 KiB
Diff
Raw Normal View History

2019-05-03 14:49:48 +00:00
diff -up ./node_build/make.js.libuv ./node_build/make.js
2019-09-19 17:19:19 +00:00
--- ./node_build/make.js.libuv 2019-05-02 04:02:32.000000000 -0400
+++ ./node_build/make.js 2019-09-18 11:01:36.021282700 -0400
2019-05-03 14:49:48 +00:00
@@ -101,7 +101,7 @@ Builder.configure({
if (!builder.config.crossCompiling) {
if (NO_MARCH_FLAG.indexOf(process.arch) == -1) {
- builder.config.cflags.push('-march=native');
+ builder.config.cflags.push('-mtune=generic');
}
}
2019-09-19 17:19:19 +00:00
@@ -291,7 +291,7 @@ Builder.configure({
2019-05-03 14:49:48 +00:00
if (!builder.config.crossCompiling) {
if (NO_MARCH_FLAG.indexOf(process.arch) == -1) {
- args.unshift('-march=native');
+ args.unshift('-mtune=generic');
}
}
2019-09-19 17:19:19 +00:00
@@ -305,7 +305,7 @@ Builder.configure({
2019-05-03 14:49:48 +00:00
}).nThen(function (waitFor) {
- builder.config.libs.push(libuvLib);
+ builder.config.libs.push('-luv');
if (!android) {
builder.config.libs.push('-lpthread');
}
2019-09-19 17:19:19 +00:00
@@ -332,15 +332,13 @@ Builder.configure({
2019-05-03 14:49:48 +00:00
);
}
- builder.config.includeDirs.push(dependencyDir + '/libuv/include/');
+ /* builder.config.includeDirs.push('/usr/include/uv/'); */
var libuvBuilt;
var python;
nThen(function (waitFor) {
- Fs.exists(libuvLib, waitFor(function (exists) {
- if (exists) { libuvBuilt = true; }
- }));
+ libuvBuilt = true;
}).nThen(function (waitFor) {
diff -up ./test/Beacon_test.c.libuv ./test/Beacon_test.c
2019-09-19 17:19:19 +00:00
--- ./test/Beacon_test.c.libuv 2019-05-02 04:02:32.000000000 -0400
+++ ./test/Beacon_test.c 2019-09-18 10:56:52.757377575 -0400
2019-05-03 14:49:48 +00:00
@@ -256,7 +256,8 @@ int main()
start(alloc, logger, base, rand, runTest);
EventBase_beginLoop(base);
- Allocator_free(alloc);
+ EventBase_endLoop(base);
+ /* Allocator_free(alloc); */
return 0;
}
#endif
diff -up ./util/events/libuv/FileNo.c.libuv ./util/events/libuv/FileNo.c
2019-09-19 17:19:19 +00:00
--- ./util/events/libuv/FileNo.c.libuv 2019-05-02 04:02:32.000000000 -0400
+++ ./util/events/libuv/FileNo.c 2019-09-18 10:56:52.757377575 -0400
2019-05-03 14:49:48 +00:00
@@ -77,14 +77,14 @@ static void onClose(uv_handle_t* handle)
#endif
#define ALLOC(buff) (((struct Allocator**) &(buff[-(8 + (((uintptr_t)buff) % 8))]))[0])
-static void incoming(uv_pipe_t* stream,
+static void incoming(uv_stream_t* stream,
ssize_t nread,
- const uv_buf_t* buf,
- uv_handle_type pending)
+ const uv_buf_t* buf)
{
// Grab out the allocator which was placed there by allocate()
struct Allocator* alloc = buf->base ? ALLOC(buf->base) : NULL;
+ uv_handle_type pending = uv_pipe_pending_type((uv_pipe_t*) stream);
Assert_true(pending == UV_UNKNOWN_HANDLE);
if (nread < 0) {
@@ -134,8 +134,8 @@ static void connected(uv_connect_t* req,
fileno->pub.pipePath, uv_strerror(status) );
uv_close((uv_handle_t*) &fileno->peer, onClose);
- } else if ((ret = uv_read2_start((uv_stream_t*)&fileno->peer, allocate, incoming))) {
- Log_info(fileno->pub.logger, "uv_read2_start() failed for pipe [%s] [%s]",
+ } else if ((ret = uv_read_start((uv_stream_t*)&fileno->peer, allocate, incoming))) {
+ Log_info(fileno->pub.logger, "uv_read_start() failed for pipe [%s] [%s]",
fileno->pub.pipePath, uv_strerror(ret));
uv_close((uv_handle_t*) &fileno->peer, onClose);
diff -up ./util/events/libuv/Timeout.c.libuv ./util/events/libuv/Timeout.c
2019-09-19 17:19:19 +00:00
--- ./util/events/libuv/Timeout.c.libuv 2019-09-18 10:56:52.757377575 -0400
+++ ./util/events/libuv/Timeout.c 2019-09-18 10:58:31.190730913 -0400
@@ -68,7 +68,7 @@ static void unlinkTo(struct Timeout* tim
2019-05-03 14:49:48 +00:00
/**
* The callback to be called by libuv.
*/
-static void handleEvent(uv_timer_t* handle, int status)
+static void handleEvent(uv_timer_t* handle)
{
struct Timeout* timeout = Identity_check((struct Timeout*) handle);
2019-09-19 17:19:19 +00:00
if (!timeout->isArmed) { return; }
@@ -196,4 +196,4 @@ void Timeout_clearAll(struct EventBase*
int Timeout_isActive(struct Timeout* timeout)
{
return (timeout && timeout->selfPtr);
-}
\ No newline at end of file
+}