Add an ifndef-guard to resolve a warning when building nodejs extension.
This commit is contained in:
parent
31feff8586
commit
827cef75a3
1 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
%insert("init") %{
|
%insert("init") %{
|
||||||
|
#ifndef BUILDING_NODE_EXTENSION
|
||||||
#define BUILDING_NODE_EXTENSION
|
#define BUILDING_NODE_EXTENSION
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <node.h>
|
#include <node.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
@ -7,6 +10,6 @@
|
||||||
%insert("post-init") %{
|
%insert("post-init") %{
|
||||||
extern "C" {
|
extern "C" {
|
||||||
NODE_MODULE(moduleName, moduleName ## _initialize)
|
NODE_MODULE(moduleName, moduleName ## _initialize)
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
%enddef
|
%enddef
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue