Skip to contentSkip to conversation

uapi: fix scsi/scsi_netlink_fc.h userspace compilation errors

PATCH Superseded Dmitry V. Levin 1 participant 1 message Mar 1, 2017 SCSI

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 uapi: fix scsi/scsi_netlink_fc.h userspace compilation errors

Consistently use types from linux/types.h to fix the following scsi/scsi_netlink_fc.h userspace compilation errors:

/usr/include/scsi/scsi_netlink_fc.h:60:2: error: unknown type name 'uint64_t'
uint64_t seconds;
/usr/include/scsi/scsi_netlink_fc.h:61:2: error: unknown type name 'uint64_t'
uint64_t vendor_id;
/usr/include/scsi/scsi_netlink_fc.h:62:2: error: unknown type name 'uint16_t'
uint16_t host_no;
/usr/include/scsi/scsi_netlink_fc.h:63:2: error: unknown type name 'uint16_t'
uint16_t event_datalen;
/usr/include/scsi/scsi_netlink_fc.h:64:2: error: unknown type name 'uint32_t'
uint32_t event_num;
/usr/include/scsi/scsi_netlink_fc.h:65:2: error: unknown type name 'uint32_t'
uint32_t event_code;
/usr/include/scsi/scsi_netlink_fc.h:66:2: error: unknown type name 'uint32_t'
uint32_t event_data;
/usr/include/scsi/scsi_netlink_fc.h:67:33: error: 'uint64_t' undeclared here (not in a function)
} __attribute__((aligned(sizeof(uint64_t))));

---
 include/uapi/scsi/scsi_netlink_fc.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
include/uapi/scsi/scsi_netlink_fc.h +8 -8
index cbf76e4..2493a0f 100644
@@ -57,14 +57,14 @@
  */
 struct fc_nl_event {
 	struct scsi_nl_hdr snlh;		/* must be 1st element ! */
-	uint64_t seconds;
-	uint64_t vendor_id;
-	uint16_t host_no;
-	uint16_t event_datalen;
-	uint32_t event_num;
-	uint32_t event_code;
-	uint32_t event_data;
-} __attribute__((aligned(sizeof(uint64_t))));
+	__u64 seconds;
+	__u64 vendor_id;
+	__u16 host_no;
+	__u16 event_datalen;
+	__u32 event_num;
+	__u32 event_code;
+	__u32 event_data;
+} __attribute__((aligned(sizeof(__u64))));
 
 
 #endif /* SCSI_NETLINK_FC_H */
Signature · 1 line
ldv