*
*/
-#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define mmap_size 524288
#ifdef HAVE_LIBLTTNG_UST_CTL
+#include <lttng/lttng-export.h>
#include <lttng/ust-sigbus.h>
-DEFINE_LTTNG_UST_SIGBUS_STATE();
+LTTNG_EXPORT DEFINE_LTTNG_UST_SIGBUS_STATE();
#endif
static int control_sock;
do {
ret = recv(fd, buf + copied, to_copy, 0);
if (ret > 0) {
- assert(ret <= to_copy);
+ LTTNG_ASSERT(ret <= to_copy);
copied += ret;
to_copy -= ret;
}
diag("[error] Error sending cmd");
goto error;
}
- assert(ret_len == sizeof(cmd));
+ LTTNG_ASSERT(ret_len == sizeof(cmd));
ret_len = lttng_live_recv(control_sock, &resp, sizeof(resp));
if (ret_len == 0) {
diag("[error] Error receiving create session reply");
goto error;
}
- assert(ret_len == sizeof(resp));
+ LTTNG_ASSERT(ret_len == sizeof(resp));
if (be32toh(resp.status) != LTTNG_VIEWER_CREATE_SESSION_OK) {
diag("[error] Error creating viewer session");