context BUGFIX do not assume pthrea_t is a number
diff --git a/src/context.c b/src/context.c
index c2c5bab..05b16f6 100644
--- a/src/context.c
+++ b/src/context.c
@@ -236,7 +236,7 @@
 {
     struct ly_ctx_err_rec *err1 = val1_p, *err2 = val2_p;
 
-    return err1->tid == err2->tid;
+    return !memcmp(&err1->tid, &err2->tid, sizeof err1->tid);
 }
 
 LIBYANG_API_DEF LY_ERR