tap-driver.sh: flush stdout after each test result
[babeltrace.git] / compat / compat_mman.c
index 1c95d8eff66d59d1a2f3b6758e8f4c0994bcdbf5..bef80d481ecb952ca794b991e1f15669588bf215 100644 (file)
 #define BT_LOG_TAG "COMPAT-MMAN"
 #include "logging.h"
 
+#ifdef __APPLE__
+/*
+ * On macOS, we need a dummy symbol so that the linker won't
+ * complain of an empty table of contents.
+ */
+BT_HIDDEN
+int bt_mman_dummy_symbol;
+#endif /* __APPLE__ */
+
 #ifdef __MINGW32__
 
 #include <errno.h>
@@ -36,7 +45,7 @@
 #include <pthread.h>
 #include <stdlib.h>
 #include <windows.h>
-#include <babeltrace/compat/mman-internal.h>
+#include <babeltrace2/compat/mman-internal.h>
 
 struct mmap_mapping {
        /* The duplicated handle. */
@@ -235,10 +244,7 @@ void *bt_mmap(void *addr, size_t length, int prot, int flags, int fd,
        }
 
        /* Add the new mapping to the hashtable. */
-       if (!g_hash_table_insert(mmap_mappings, mapping_addr, mapping)) {
-               BT_LOGF_STR("Failed to insert mapping in the hashtable.");
-               abort();
-       }
+       g_hash_table_insert(mmap_mappings, mapping_addr, mapping);
 
        mmap_unlock();
 
This page took 0.023601 seconds and 4 git commands to generate.