diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2023-08-03 16:49:29 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2023-08-03 16:49:29 +0000 |
commit | 1cbd30ee1ffb726a2c8201bbe4a37bc135ef18d8 (patch) | |
tree | d1bbfdc35cc10ead35c8f57c881a6e6fcc5d5488 | |
parent | d176dd620541c74dcf9df7f80720861579890f2c (diff) | |
download | sg3_utils-1cbd30ee1ffb726a2c8201bbe4a37bc135ef18d8.tar.gz |
[PATCH 1/2] Unbreak the Android build
The header file include/sg_pt_linux.h defines the __u64 type and is
included even if the <linux/types.h> header is present and defines the
__u64 type. Fix this by only defining the __u64 type if it is not
defined in <linux/types.h> header.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@1044 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | doc/sg3_utils.8 | 2 | ||||
-rw-r--r-- | include/sg_pt_linux_missing.h | 2 | ||||
-rw-r--r-- | sg3_utils.spec | 6 |
6 files changed, 37 insertions, 4 deletions
@@ -2,6 +2,9 @@ Each utility has its own version number, date of last change and some description at the top of its ".c" file. All utilities in the main directory have their own "man" pages. There is also a sg3_utils man page. +Changelog for pre-release sg3_utils-1.49 [20230803] [svn: r1044] + - apply https://github.com/doug-gilbert/sg3_utils/pull/39 + Changelog for released sg3_utils-1.48 [20230801] [svn: r1042] - decoding utilities: add --json[=JO] and --js-file=JFN options, short form changed to -j[=JO] diff --git a/configure.ac b/configure.ac index 87b0d800..5ec03740 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([sg3_utils],[1.48],[dgilbert@interlog.com]) +AC_INIT([sg3_utils],[1.49],[dgilbert@interlog.com]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AM_MAINTAINER_MODE @@ -87,13 +87,31 @@ check_for_linux_sg_v4_hdr() { [AC_DEFINE_UNQUOTED(HAVE_LINUX_SG_V4_HDR, 1, [Have Linux sg v4 header]) ]) } +check_for___u64() { + AC_MSG_CHECKING([for __u64]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #ifdef HAVE_LINUX_TYPES_H + #include <linux/types.h> + #endif + ]],[[ + __u64 var = 0; + return var; + ]])], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE___U64, 1, [__u64 is defined in <linux/types.h>]) + ], + [AC_MSG_RESULT(no)]) +} + case "${host}" in *-*-android*) AC_DEFINE_UNQUOTED(SG_LIB_ANDROID, 1, [sg3_utils on android]) AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux]) check_for_linux_sg_v4_hdr check_for_getrandom - check_for_linux_nvme_headers;; + check_for_linux_nvme_headers + check_for___u64;; *-*-freebsd*|*-*-kfreebsd*-gnu*) AC_DEFINE_UNQUOTED(SG_LIB_FREEBSD, 1, [sg3_utils on FreeBSD]) AC_DEFINE_UNQUOTED(HAVE_NVME, 1, [Found NVMe]) diff --git a/debian/changelog b/debian/changelog index 3a37e941..6ccbf69a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sg3-utils (1.49-0.1) unstable; urgency=low + + * New upstream version + + -- Douglas Gilbert <dgilbert@interlog.com> Wed, 02 Aug 2023 11:00:00 -0400 + sg3-utils (1.48-0.1) unstable; urgency=low * New upstream version diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8 index dfe4c6d8..2cb6461d 100644 --- a/doc/sg3_utils.8 +++ b/doc/sg3_utils.8 @@ -1,4 +1,4 @@ -.TH SG3_UTILS "8" "August 2023" "sg3_utils\-1.48" SG3_UTILS +.TH SG3_UTILS "8" "August 2023" "sg3_utils\-1.49" SG3_UTILS .SH NAME sg3_utils \- a package of utilities for sending SCSI commands .SH SYNOPSIS diff --git a/include/sg_pt_linux_missing.h b/include/sg_pt_linux_missing.h index b1102991..5f7c2ce6 100644 --- a/include/sg_pt_linux_missing.h +++ b/include/sg_pt_linux_missing.h @@ -24,6 +24,7 @@ extern "C" { #endif +#ifndef HAVE___U64 /* typedefs if linux/types.h header not available */ typedef uint64_t __u64; @@ -32,6 +33,7 @@ typedef uint32_t __u32; typedef int32_t __s32; typedef uint16_t __u16; typedef int16_t __s16; +#endif /* Following if linux/major.h header is not available */ diff --git a/sg3_utils.spec b/sg3_utils.spec index 523d8b82..b068eb3d 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -1,6 +1,6 @@ Summary: Utilities for devices that use SCSI command sets Name: sg3_utils -Version: 1.48 +Version: 1.49 # Release: 1%{?dist} Release: 1 License: GPL @@ -84,6 +84,10 @@ fi %{_libdir}/*.a %changelog +* Wed Aug 02 2023 - dgilbert at interlog dot com +- track t10 changes + * sg3_utils-1.49 + * Tue Aug 01 2023 - dgilbert at interlog dot com - track t10 changes * sg3_utils-1.48 |