blob: e4a3975da6955d6eca941f14683a0a5a42cf356d [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Sep 2017 09:39:40 -0700
4Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX
5
6Use _GNU_SOURCE instead of libc internal __USE_GNU
7Do not use the deprecated headers under include/sys
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011---
12 src/base/os_defs.h | 5 +++--
13 src/mds/mds_dt_tcp.c | 1 -
14 src/mds/mds_dt_tcp_disc.h | 2 +-
15 src/mds/mds_dt_tipc.c | 1 -
16 src/mds/mds_dt_tipc.h | 2 +-
17 src/mds/mds_dt_trans.c | 1 -
18 src/ntf/ntfd/NtfLogger.cc | 2 +-
19 7 files changed, 6 insertions(+), 8 deletions(-)
20
21diff --git a/src/base/os_defs.h b/src/base/os_defs.h
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022index a570c43..3559b19 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023--- a/src/base/os_defs.h
24+++ b/src/base/os_defs.h
25@@ -47,17 +47,18 @@
26 #include <sys/stat.h>
27 #include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */
28 #include <syslog.h>
29-#ifndef __USE_GNU
30+#include <limits.h>
31+#ifndef _GNU_SOURCE
32 struct msgbuf {
33 long int mtype;
34 char mtext[1];
35 };
36 #endif /* else defined in <sys/msg.h> */
37 #include <sys/time.h>
38-#include <sys/fcntl.h>
39 #include <sys/socket.h>
40 #include <netinet/in.h>
41
42+#include <fcntl.h>
43 #include <signal.h>
44 #include <pthread.h>
45
46diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047index 1407eb1..a87c22f 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048--- a/src/mds/mds_dt_tcp.c
49+++ b/src/mds/mds_dt_tcp.c
50@@ -27,7 +27,6 @@
51
52 #include <stdlib.h>
53 #include <sched.h>
54-#include <sys/poll.h>
55 #include <poll.h>
56 #include <sys/types.h>
57 #include <unistd.h>
58diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080059index a6249d7..574f526 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050060--- a/src/mds/mds_dt_tcp_disc.h
61+++ b/src/mds/mds_dt_tcp_disc.h
62@@ -24,7 +24,7 @@
63 #include "base/ncssysf_tsk.h"
64 #include "base/ncssysf_mem.h"
65 #include "mds_dt_tcp_disc.h"
66-#include "sys/poll.h"
67+#include <poll.h>
68
69 /* mds_indentifire + mds_version + msg_type + scope_type + server_type +
70 server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val +
71diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072index 7714175..a0ed3b6 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050073--- a/src/mds/mds_dt_tipc.c
74+++ b/src/mds/mds_dt_tipc.c
75@@ -35,7 +35,6 @@
76 #include <stdbool.h>
77 #include <stdlib.h>
78 #include <sched.h>
79-#include <sys/poll.h>
80 #include <poll.h>
81 #include <sys/types.h>
82 #include <unistd.h>
83diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080084index e73a11b..401d208 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050085--- a/src/mds/mds_dt_tipc.h
86+++ b/src/mds/mds_dt_tipc.h
87@@ -32,7 +32,7 @@
88 #include <assert.h>
89 #include <string.h>
90 #include <sys/param.h>
91-#include <sys/poll.h>
92+#include <poll.h>
93 #include <netdb.h>
94 #include <errno.h>
95 #include <fcntl.h>
96diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080097index 6f621e0..5aacbd3 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050098--- a/src/mds/mds_dt_trans.c
99+++ b/src/mds/mds_dt_trans.c
100@@ -26,7 +26,6 @@
101 #include "mds_core.h"
102 #include "base/osaf_utility.h"
103
104-#include <sys/poll.h>
105 #include <poll.h>
106
107 #define MDS_PROT_TCP 0xA0
108diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800109index fd17c58..1120008 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500110--- a/src/ntf/ntfd/NtfLogger.cc
111+++ b/src/ntf/ntfd/NtfLogger.cc
112@@ -20,7 +20,7 @@
113 * INCLUDE FILES
114 * ========================================================================
115 */
116-#include <sys/poll.h>
117+#include <poll.h>
118
119 #include "base/osaf_utility.h"
120 #include <saAis.h>