Commit 16848050 authored by Jason Orendorff's avatar Jason Orendorff
Browse files

Bug 1443147 - Fix PosixNSPR build after bug 1441454. r=sfink

--HG--
extra : rebase_source : 8187dec35e6d7c398f31c2438cd903edb52fe6b4
parent 897ea8c3
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -136,12 +136,25 @@ using mozilla::TimeStamp;

// Avoid an unnecessary NSPR dependency on Linux and OS X just for the shell.
#ifdef JS_POSIX_NSPR

enum PRLibSpecType { PR_LibSpec_Pathname };

struct PRLibSpec {
    PRLibSpecType type;
    union {
        const char *pathname;
    } value;
};

typedef void PRLibrary;

#define PR_LD_NOW    RTLD_NOW
#define PR_LD_GLOBAL RTLD_GLOBAL

static PRLibrary *
PR_LoadLibrary(const char* path)
PR_LoadLibraryWithFlags(PRLibSpec libSpec, int flags)
{
    return dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
    return dlopen(libSpec.value.pathname, flags);
}

static void