Skip to content

Commit 72e9b8c

Browse files
fabrics: Made more includes conditional on fabrics support
Made more fabrics-specific and netdb-specific includes conditional on fabrics and netdb support. Also removed unneeded ioctl.h include from logging.c. Signed-off-by: Broc Going <[email protected]>
1 parent f018b37 commit 72e9b8c

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

libnvme/src/nvme/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
#include <unistd.h>
1818

1919
#if defined(HAVE_NETDB) || defined(CONFIG_FABRICS)
20-
#include <sys/types.h>
2120
#include <ifaddrs.h>
22-
#endif
2321

2422
#include <arpa/inet.h>
2523
#include <netdb.h>
24+
#endif
25+
2626
#include <sys/param.h>
2727
#include <sys/stat.h>
2828
#include <sys/types.h>

logging.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <stdint.h>
77
#include <string.h>
88

9-
#include <sys/ioctl.h>
109
#include <sys/time.h>
1110

1211
#include <ccan/endian/endian.h>

nvme-print-json.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
#include <errno.h>
55
#include <time.h>
66
#include <sys/types.h>
7+
8+
#ifdef CONFIG_FABRICS
79
#include <sys/socket.h>
810
#include <arpa/inet.h>
11+
#endif
12+
913
#include <ccan/compiler/compiler.h>
1014

1115
#include <libnvme.h>

nvme-print-stdout.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
#include <time.h>
88
#include <sys/stat.h>
99
#include <sys/types.h>
10+
11+
#ifdef CONFIG_FABRICS
1012
#include <sys/socket.h>
1113
#include <arpa/inet.h>
14+
#endif
15+
1216
#include <ccan/strset/strset.h>
1317
#include <ccan/htable/htable_type.h>
1418
#include <ccan/htable/htable.h>

0 commit comments

Comments
 (0)