Port: dirfd is not portable, replace it
[babeltrace.git] / tests / lib / common.c
index 0b8ebdf1206296691a84f963feb0cb44f5c2cd07..08bc1185bebddca93cfefa4c37b4d26aa1f40b74 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <babeltrace/context.h>
-#include <babeltrace/iterator.h>
-#include <babeltrace/compat/dirent.h>
-#include <babeltrace/compat/limits.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <babeltrace/compat/limits-internal.h>
 #include <sys/stat.h>
 
-struct bt_context *create_context_with_path(const char *path)
-{
-       struct bt_context *ctx;
-       int ret;
-
-       ctx = bt_context_create();
-       if (!ctx) {
-               return NULL;
-       }
-
-       ret = bt_context_add_trace(ctx, path, "ctf", NULL, NULL, NULL);
-       if (ret < 0) {
-               bt_context_put(ctx);
-               return NULL;
-       }
-       return ctx;
-}
-
 void recursive_rmdir(const char *path)
 {
        struct dirent *entry;
This page took 0.029374 seconds and 4 git commands to generate.