summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs/unit-http/unit.h
diff options
context:
space:
mode:
authorAlexander Borisov <alexander.borisov@nginx.com>2018-12-19 15:56:57 +0300
committerAlexander Borisov <alexander.borisov@nginx.com>2018-12-19 15:56:57 +0300
commitd6f38a3268dd4df717bdb9054f3f9ee47fa1f429 (patch)
tree2e98fedf75a53ef5a34d3aedf7f7c547fe5a31a2 /src/nodejs/unit-http/unit.h
parentc55f329ecf8d32bad0d5bc2aae1da1522b3a92f8 (diff)
downloadunit-d6f38a3268dd4df717bdb9054f3f9ee47fa1f429.tar.gz
unit-d6f38a3268dd4df717bdb9054f3f9ee47fa1f429.tar.bz2
Node.js: added check for libunit version at compile time.
Diffstat (limited to 'src/nodejs/unit-http/unit.h')
-rw-r--r--src/nodejs/unit-http/unit.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nodejs/unit-http/unit.h b/src/nodejs/unit-http/unit.h
index 5f541cc4..8baeb967 100644
--- a/src/nodejs/unit-http/unit.h
+++ b/src/nodejs/unit-http/unit.h
@@ -6,18 +6,23 @@
#ifndef _NXT_NODEJS_UNIT_H_INCLUDED_
#define _NXT_NODEJS_UNIT_H_INCLUDED_
-
#include <node_api.h>
-
#ifdef __cplusplus
extern "C" {
#endif
+#include "version.h"
#include <nxt_unit.h>
+
+#if NXT_UNIT_VERNUM != NXT_NODE_VERNUM
+#error "libunit version mismatch."
+#endif
+
#include <nxt_unit_response.h>
#include <nxt_unit_request.h>
+
#ifdef __cplusplus
} /* extern "C" */
#endif