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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Sep 2017 09:39:40 -0700
Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX
Use _GNU_SOURCE instead of libc internal __USE_GNU
Do not use the deprecated headers under include/sys
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/base/os_defs.h | 5 +++--
src/mds/mds_dt_tcp.c | 1 -
src/mds/mds_dt_tcp_disc.h | 2 +-
src/mds/mds_dt_tipc.c | 1 -
src/mds/mds_dt_tipc.h | 2 +-
src/mds/mds_dt_trans.c | 1 -
src/ntf/ntfd/NtfLogger.cc | 2 +-
7 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/base/os_defs.h b/src/base/os_defs.h
index a570c43..3559b19 100644
--- a/src/base/os_defs.h
+++ b/src/base/os_defs.h
@@ -47,17 +47,18 @@
#include <sys/stat.h>
#include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */
#include <syslog.h>
-#ifndef __USE_GNU
+#include <limits.h>
+#ifndef _GNU_SOURCE
struct msgbuf {
long int mtype;
char mtext[1];
};
#endif /* else defined in <sys/msg.h> */
#include <sys/time.h>
-#include <sys/fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <fcntl.h>
#include <signal.h>
#include <pthread.h>
diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
index 1407eb1..a87c22f 100644
--- a/src/mds/mds_dt_tcp.c
+++ b/src/mds/mds_dt_tcp.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <sched.h>
-#include <sys/poll.h>
#include <poll.h>
#include <sys/types.h>
#include <unistd.h>
diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h
index a6249d7..574f526 100644
--- a/src/mds/mds_dt_tcp_disc.h
+++ b/src/mds/mds_dt_tcp_disc.h
@@ -24,7 +24,7 @@
#include "base/ncssysf_tsk.h"
#include "base/ncssysf_mem.h"
#include "mds_dt_tcp_disc.h"
-#include "sys/poll.h"
+#include <poll.h>
/* mds_indentifire + mds_version + msg_type + scope_type + server_type +
server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val +
diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c
index 7714175..a0ed3b6 100644
--- a/src/mds/mds_dt_tipc.c
+++ b/src/mds/mds_dt_tipc.c
@@ -35,7 +35,6 @@
#include <stdbool.h>
#include <stdlib.h>
#include <sched.h>
-#include <sys/poll.h>
#include <poll.h>
#include <sys/types.h>
#include <unistd.h>
diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h
index e73a11b..401d208 100644
--- a/src/mds/mds_dt_tipc.h
+++ b/src/mds/mds_dt_tipc.h
@@ -32,7 +32,7 @@
#include <assert.h>
#include <string.h>
#include <sys/param.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <netdb.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c
index 6f621e0..5aacbd3 100644
--- a/src/mds/mds_dt_trans.c
+++ b/src/mds/mds_dt_trans.c
@@ -26,7 +26,6 @@
#include "mds_core.h"
#include "base/osaf_utility.h"
-#include <sys/poll.h>
#include <poll.h>
#define MDS_PROT_TCP 0xA0
diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc
index fd17c58..1120008 100644
--- a/src/ntf/ntfd/NtfLogger.cc
+++ b/src/ntf/ntfd/NtfLogger.cc
@@ -20,7 +20,7 @@
* INCLUDE FILES
* ========================================================================
*/
-#include <sys/poll.h>
+#include <poll.h>
#include "base/osaf_utility.h"
#include <saAis.h>
|