1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
https://github.com/openucx/ucx/pull/8495
From 77ea0b015bc2d18f4a6bc2ba0fb9b71ac7532199 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 3 Sep 2022 00:44:28 +0100
Subject: [PATCH 1/2] UCM: Fix deprecated <sys/fcntl.h> includes
Fix deprecation warnings like:
```
In file included from /var/tmp/portage/sys-cluster/ucx-1.10.0_rc5/work/ucx-1.10.0-rc5/src/ucs/sys/sys.h:29,
from mmap/install.c:21:
/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcpp]]
1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
| ^~~~~~~
```
Bug: https://bugs.gentoo.org/832966
Signed-off-by: Sam James <sam@gentoo.org>
--- a/src/tools/profile/read_profile.c
+++ b/src/tools/profile/read_profile.c
@@ -13,12 +13,12 @@
#include <ucs/sys/string.h>
#include <sys/signal.h>
-#include <sys/fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <getopt.h>
+#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
--- a/src/ucm/util/reloc.c
+++ b/src/ucm/util/reloc.c
@@ -17,7 +17,6 @@
#include <ucs/sys/string.h>
#include <ucs/sys/sys.h>
-#include <sys/fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
--- a/test/apps/sockaddr/sa_tcp.cc
+++ b/test/apps/sockaddr/sa_tcp.cc
@@ -8,8 +8,8 @@
#include <sys/socket.h>
#include <sys/epoll.h>
-#include <sys/fcntl.h>
#include <arpa/inet.h>
+#include <fcntl.h>
#include <unistd.h>
#include <cstring>
#include <cerrno>
From 9f9e50e5472e390c86147b9031ddd8525207822a Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 3 Sep 2022 00:44:56 +0100
Subject: [PATCH 2/2] UCS: Fix deprecated <sys/fcntl.h> includes
Fix deprecation warnings like:
```
In file included from /var/tmp/portage/sys-cluster/ucx-1.10.0_rc5/work/ucx-1.10.0-rc5/src/ucs/sys/sys.h:29,
from mmap/install.c:21:
/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcpp]]
1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
| ^~~~~~~
```
Bug: https://bugs.gentoo.org/832966
Signed-off-by: Sam James <sam@gentoo.org>
--- a/src/ucs/sys/sys.h
+++ b/src/ucs/sys/sys.h
@@ -26,7 +26,6 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>
-#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/param.h>
@@ -36,6 +35,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
--- a/test/gtest/ucs/test_vfs.cc
+++ b/test/gtest/ucs/test_vfs.cc
@@ -12,7 +12,7 @@ extern "C" {
#include <ucs/vfs/sock/vfs_sock.h>
}
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <time.h>
|