basho / erlang_js

A linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime.
Apache License 2.0
238 stars 88 forks source link

Fix pre-R15 compatibility #23

Closed jtuple closed 12 years ago

jtuple commented 12 years ago

Compiling on R14 failed with the following error:

Compiling c_src/driver_comm.c
c_src/driver_comm.h:32: error: expected ')' before 'size'

The line in question:

void *ejs_alloc(ErlDrvSizeT size);

The problem is that ErlDrvSizeT is an R15 type. We have erl_compatibility.h that defines a compat type for pre-R15 builds, but the include file was being included after driver_comm.h.

This pull-request fixes the include order, and things now compile as desired.

bookshelfdave commented 12 years ago

@jtuple Compiles OK on R14B03. +1