Skip to content

Commit

Permalink
Fixed some Linux issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbranson committed Nov 15, 2010
1 parent 63c3084 commit 74087cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/dynamic_library.js
Expand Up @@ -7,7 +7,7 @@ var DynamicLibrary = module.exports = function(path, mode) {
this.close = function() { }; // neuter close
}
else {
this._handle = this._dlopen(path, mode);
this._handle = this._dlopen(path, mode || DynamicLibrary.FLAGS.RTLD_NOW);

if (this._handle.isNull()) {
throw new Error("Dynamic Linking Error: " + this._dlerror());
Expand Down
3 changes: 2 additions & 1 deletion lib/ffi.js
Expand Up @@ -30,9 +30,10 @@ FFI.SIZE_TO_POINTER_METHOD_MAP = {
};

FFI.PLATFORM_LIBRARY_EXTENSIONS = {
"linux": ".so",
"linux2": ".so",
"darwin": ".dylib",
"sunos": ".so",
"sunos": ".so"
};

// A list of types with no hard C++ methods to read/write them
Expand Down
4 changes: 2 additions & 2 deletions src/ffi.h
Expand Up @@ -4,6 +4,8 @@
#include <string.h>
#include <dlfcn.h>
#include <limits.h>
#define __STDC_LIMIT_MACROS true
#include <stdint.h>
#include <sys/mman.h>
#ifdef __APPLE__
#include <ffi/ffi.h>
Expand All @@ -17,8 +19,6 @@
#include <pthread.h>
#include <queue>

#define MAX_BYTE_VALUE 255

using namespace v8;
using namespace node;

Expand Down

0 comments on commit 74087cc

Please sign in to comment.