public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] uapi: fix scsi/scsi_netlink.h userspace compilation errors
@ 2017-03-01  0:12 Dmitry V. Levin
  0 siblings, 0 replies; only message in thread
From: Dmitry V. Levin @ 2017-03-01  0:12 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen; +Cc: linux-scsi, linux-kernel

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

/usr/include/scsi/scsi_netlink.h:43:2: error: unknown type name 'uint8_t'
  uint8_t version;
/usr/include/scsi/scsi_netlink.h:44:2: error: unknown type name 'uint8_t'
  uint8_t transport;
/usr/include/scsi/scsi_netlink.h:45:2: error: unknown type name 'uint16_t'
  uint16_t magic;
/usr/include/scsi/scsi_netlink.h:46:2: error: unknown type name 'uint16_t'
  uint16_t msgtype;
/usr/include/scsi/scsi_netlink.h:47:2: error: unknown type name 'uint16_t'
  uint16_t msglen;
/usr/include/scsi/scsi_netlink.h:48:33: error: 'uint64_t' undeclared here (not in a function)
 } __attribute__((aligned(sizeof(uint64_t))));
/usr/include/scsi/scsi_netlink.h:92:2: error: expected specifier-qualifier-list before 'uint64_t'
  uint64_t vendor_id;

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 include/uapi/scsi/scsi_netlink.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/uapi/scsi/scsi_netlink.h b/include/uapi/scsi/scsi_netlink.h
index 62b4eda..20360e1 100644
--- a/include/uapi/scsi/scsi_netlink.h
+++ b/include/uapi/scsi/scsi_netlink.h
@@ -40,12 +40,12 @@
 
 /* SCSI_TRANSPORT_MSG event message header */
 struct scsi_nl_hdr {
-	uint8_t version;
-	uint8_t transport;
-	uint16_t magic;
-	uint16_t msgtype;
-	uint16_t msglen;
-} __attribute__((aligned(sizeof(uint64_t))));
+	__u8 version;
+	__u8 transport;
+	__u16 magic;
+	__u16 msgtype;
+	__u16 msglen;
+} __attribute__((aligned(sizeof(__u64))));
 
 /* scsi_nl_hdr->version value */
 #define SCSI_NL_VERSION				1
@@ -89,10 +89,10 @@ struct scsi_nl_hdr {
  */
 struct scsi_nl_host_vendor_msg {
 	struct scsi_nl_hdr snlh;		/* must be 1st element ! */
-	uint64_t vendor_id;
-	uint16_t host_no;
-	uint16_t vmsg_datalen;
-} __attribute__((aligned(sizeof(uint64_t))));
+	__u64 vendor_id;
+	__u16 host_no;
+	__u16 vmsg_datalen;
+} __attribute__((aligned(sizeof(__u64))));
 
 
 /*
-- 
ldv

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-01  0:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01  0:12 [PATCH 1/3] uapi: fix scsi/scsi_netlink.h userspace compilation errors Dmitry V. Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox