Revert "lttng-ctl: Hide symbol introduced by fix"
[lttng-tools.git] / tests / unit / test_payload.cpp
index 2d1e016964461f9c800c574c697ca83e90c6e9c3..9b9f770466ed6dd53cb0dc5b6c97fe0aa818eda2 100644 (file)
@@ -5,10 +5,10 @@
  *
  */
 
-#include <common/compat/fcntl.hpp>
 #include <common/payload-view.hpp>
 #include <common/payload.hpp>
 
+#include <fcntl.h>
 #include <tap/tap.h>
 #include <unistd.h>
 
@@ -29,7 +29,7 @@ static void test_fd_push_pop_order()
 
        diag("Validating fd push/pop order");
        for (i = 0; i < 3; i++) {
-               int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
+               const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
                struct fd_handle *handle;
 
                LTTNG_ASSERT(fd >= 0);
@@ -77,7 +77,7 @@ static void test_fd_push_pop_imbalance()
        diag("Validating fd pop imbalance");
        for (i = 0; i < 10; i++) {
                struct fd_handle *handle;
-               int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
+               const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
 
                LTTNG_ASSERT(fd >= 0);
 
@@ -118,7 +118,7 @@ fail:
 static void test_fd_pop_fd_root_views()
 {
        int ret, i;
-       int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
+       const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
        struct fd_handle *handle;
        struct lttng_payload payload;
        const char *const test_description =
This page took 0.031154 seconds and 4 git commands to generate.