#define _GNU_SOURCE 1
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void link_meshlink_pair(meshlink_handle_t *a, meshlink_handle_t *b) {
// Import and export both side's data
- meshlink_add_address(a, "localhost");
- meshlink_add_address(b, "localhost");
+ assert(meshlink_set_canonical_address(a, meshlink_get_self(a), "localhost", NULL));
+ assert(meshlink_set_canonical_address(b, meshlink_get_self(b), "localhost", NULL));
char *data = meshlink_export(a);
assert(data);