Use compiler-agnostic defines to silence warning
[lttng-tools.git] / tests / unit / test_unix_socket.cpp
index ea02c2ec2700ddcebc3b42f810fea9b7ab5b6a9a..95a6173b8e75a15d9183348b34d2f350e10b1f09 100644 (file)
@@ -5,7 +5,6 @@
  *
  */
 
-#include <common/compat/fcntl.hpp>
 #include <common/defaults.hpp>
 #include <common/error.hpp>
 #include <common/payload-view.hpp>
@@ -17,6 +16,7 @@
 #include <lttng/constant.h>
 
 #include <algorithm>
+#include <fcntl.h>
 #include <pthread.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -70,7 +70,7 @@ static void test_high_fd_count(unsigned int fd_count)
 
        for (i = 0; i < fd_count; i++) {
                struct fd_handle *handle;
-               int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
+               const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
 
                if (fd < 0) {
                        PERROR("Failed to create fd while creating test payload");
This page took 0.024421 seconds and 4 git commands to generate.