Brad Bishop | 0f291cc | 2019-09-01 15:16:57 -0400 | [diff] [blame^] | 1 | From 01a75b23382fd042673d1f00fce708ba6c67d05a Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 30 Aug 2019 13:12:54 -0700 |
| 4 | Subject: [PATCH] Use stangard int types |
| 5 | |
| 6 | __unitn_* are internal to GNU libc lets use portable types |
| 7 | |
| 8 | Fixes |
| 9 | error: unknown type name '__uint8_t' |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | lib/engine/end_device.cpp | 13 +++++++------ |
| 14 | 1 file changed, 7 insertions(+), 6 deletions(-) |
| 15 | |
| 16 | diff --git a/lib/engine/end_device.cpp b/lib/engine/end_device.cpp |
| 17 | index 5a66de9..da078bf 100644 |
| 18 | --- a/lib/engine/end_device.cpp |
| 19 | +++ b/lib/engine/end_device.cpp |
| 20 | @@ -36,6 +36,7 @@ |
| 21 | #include <sys/ioctl.h> |
| 22 | #include <fcntl.h> |
| 23 | #include <linux/hdreg.h> |
| 24 | +#include <stdint.h> |
| 25 | #include <unistd.h> |
| 26 | #include <linux/fs.h> |
| 27 | #include <climits> |
| 28 | @@ -90,20 +91,20 @@ using boost::shared_ptr; |
| 29 | |
| 30 | struct AtaCommand |
| 31 | { |
| 32 | - __uint8_t command; |
| 33 | - __uint8_t obsolete1; |
| 34 | - __uint8_t obsolete2; |
| 35 | - __uint8_t transportDependent; |
| 36 | + uint8_t command; |
| 37 | + uint8_t obsolete1; |
| 38 | + uint8_t obsolete2; |
| 39 | + uint8_t transportDependent; |
| 40 | }; |
| 41 | |
| 42 | struct AtaIdentifyCall |
| 43 | { |
| 44 | AtaCommand command; |
| 45 | - __uint16_t data[256]; |
| 46 | + uint16_t data[256]; |
| 47 | }; |
| 48 | |
| 49 | namespace { |
| 50 | - __uint16_t swap(__uint16_t value) |
| 51 | + uint16_t swap(uint16_t value) |
| 52 | { |
| 53 | return (value >> 8) | (value << 8); |
| 54 | } |