Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 15 Sep 2017 09:39:40 -0700 |
| 4 | Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX |
| 5 | |
| 6 | Use _GNU_SOURCE instead of libc internal __USE_GNU |
| 7 | Do not use the deprecated headers under include/sys |
| 8 | |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | --- |
| 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 | |
| 21 | diff --git a/src/base/os_defs.h b/src/base/os_defs.h |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | index a570c43..3559b19 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | --- 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 | |
| 46 | diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 47 | index 1407eb1..a87c22f 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 48 | --- 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> |
| 58 | diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | index a6249d7..574f526 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 60 | --- 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 + |
| 71 | diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 72 | index 7714175..a0ed3b6 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 73 | --- 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> |
| 83 | diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | index e73a11b..401d208 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 85 | --- 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> |
| 96 | diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 97 | index 6f621e0..5aacbd3 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 98 | --- 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 |
| 108 | diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 109 | index fd17c58..1120008 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 110 | --- 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> |