Skip to content

Commit

Permalink
fix: Fix issue #74
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Feb 22, 2021
1 parent bf27a88 commit f92d82d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/node.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#include <uv.h>
#include <node_object_wrap.h>

// From https://github.com/nodejs/nan/issues/807#issuecomment-581536991
#if defined(__GNUC__) && __GNUC__ >= 8
#define DISABLE_WCAST_FUNCTION_TYPE _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#define DISABLE_WCAST_FUNCTION_TYPE_END _Pragma("GCC diagnostic pop")
#else
#define DISABLE_WCAST_FUNCTION_TYPE
#define DISABLE_WCAST_FUNCTION_TYPE_END
#endif

DISABLE_WCAST_FUNCTION_TYPE
#include <nan.h>
DISABLE_WCAST_FUNCTION_TYPE_END

#include "pkcs11/pkcs11.h"

Expand Down

0 comments on commit f92d82d

Please sign in to comment.