Skip to content

Commit 9f302b4

Browse files
committed
types: provide base types when missing
Not all platforms define the base types used throughout the library. Inthat case, define them. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 5cfa491 commit 9f302b4

22 files changed

Lines changed: 57 additions & 24 deletions

fabrics.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
#include <time.h>
3434
#include <unistd.h>
3535

36-
#include <linux/types.h>
37-
3836
#include <sys/stat.h>
3937
#include <sys/types.h>
4038

libnvme/src/libnvme.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extern "C" {
2323
#include <nvme/nvme-cmds.h>
2424
#include <nvme/nvme-types.h>
2525
#include <nvme/tree.h>
26+
#include <nvme/types.h>
2627
#include <nvme/util.h>
2728
@FABRICS_INCLUDE@
2829

libnvme/src/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ headers = [
3535
'nvme/nvme-cmds.h',
3636
'nvme/nvme-types.h',
3737
'nvme/tree.h',
38+
'nvme/types.h',
3839
'nvme/util.h',
3940
]
4041

libnvme/src/nvme/accessors-fabrics.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#include <string.h>
2525
#include <stdbool.h>
2626
#include <stdint.h>
27-
#include <linux/types.h> /* __u32, __u64, etc. */
27+
28+
#include <nvme/types.h>
2829

2930
/* Forward declarations. These are internal (opaque) structs. */
3031
struct libnvmf_discovery_args;

libnvme/src/nvme/accessors.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#include <string.h>
2525
#include <stdbool.h>
2626
#include <stdint.h>
27-
#include <linux/types.h> /* __u32, __u64, etc. */
27+
28+
#include <nvme/types.h>
2829

2930
/* Forward declarations. These are internal (opaque) structs. */
3031
struct libnvme_path;

libnvme/src/nvme/lib-types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
#pragma once
1010

11-
#include <linux/types.h>
11+
#include <nvme/types.h>
1212

1313
struct libnvme_global_ctx;
1414
struct libnvme_transport_handle;

libnvme/src/nvme/mi-mctp-compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef _MI_MCTP_COMPAT_H
44
#define _MI_MCTP_COMPAT_H
55

6-
#include <linux/types.h>
6+
#include <nvme/types.h>
77

88
/* As of kernel v5.15, these AF_MCTP-related definitions are provided by
99
* linux/mctp.h. However, we provide a set here while that header percolates

libnvme/src/nvme/nbft.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include <stdbool.h>
1212

13-
#include <linux/types.h>
1413
#include <sys/types.h>
1514

1615
#include <nvme/lib-types.h>

libnvme/src/nvme/nvme-types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <stdint.h>
1313
#include <stdio.h>
1414

15-
#include <linux/types.h>
15+
#include <nvme/types.h>
1616

1717
/**
1818
* DOC: types.h

libnvme/src/nvme/private-fabrics.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
*/
88
#pragma once
99

10-
#include <linux/types.h>
11-
1210
#include <nvme/tree.h>
1311

1412
/**

0 commit comments

Comments
 (0)