From 817a9ae848182968792c1eaacb934bf574144792 Mon Sep 17 00:00:00 2001 From: Adam Haile Date: Thu, 23 Jan 2014 11:30:36 -0500 Subject: [PATCH] Compatibility changes for Angstrom (Node 0.8) Angstrom for Beaglebone Black is still at version 0.8.22 of node.js. I had to make a few changes to build node-pru. These follow the guidelines from https://github.com/joyent/node/wiki/Api-changes-between-v0.8-and-v0.10 . - add explicit cast to (uv_after_work_cb) to 4th arg of call to uv_queue_work - use backwards-compatible version of Init, that doesn't receive a handle to module --- src/pru.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pru.cpp b/src/pru.cpp index f8694be..fda3989 100644 --- a/src/pru.cpp +++ b/src/pru.cpp @@ -228,7 +228,7 @@ Handle waitForInterrupt(const Arguments& args) { baton->request.data = baton; baton->callback = Persistent::New(callback); - uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, AsyncAfter); + uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, (uv_after_work_cb)AsyncAfter); return scope.Close(Undefined()); } @@ -257,7 +257,7 @@ Handle forceExit(const Arguments& args) { }; /* Initialise the module */ -void Init(Handle exports, Handle module) { +void Init(Handle exports) { // pru.init(); exports->Set(String::NewSymbol("init"), FunctionTemplate::New(InitPRU)->GetFunction());