From: Akihiro Sagawa <sagawa.aki(a)gmail.com> This reverts most of commit b8b15f3e6e0e. Since its introduction in Linux 2.2.16, request_sense in linux/cdrom.h has been a structure, not a type. Therefore, HAVE_REQUEST_SENSE has not been defined for over two decades. --- configure | 11 ----------- configure.ac | 2 -- dlls/ntdll/unix/cdrom.c | 6 ------ include/config.h.in | 3 --- 4 files changed, 22 deletions(-) diff --git a/configure b/configure index 7ff3d4040a2..e6868a98b9c 100755 --- a/configure +++ b/configure @@ -21481,17 +21481,6 @@ printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "request_sense" "ac_cv_type_request_sense" "#include <linux/cdrom.h> -" -if test "x$ac_cv_type_request_sense" = xyes -then : - -printf "%s\n" "#define HAVE_REQUEST_SENSE 1" >>confdefs.h - - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use re-entrant gethostbyname_r Linux style" >&5 printf %s "checking whether we can use re-entrant gethostbyname_r Linux style... " >&6; } if test ${wine_cv_linux_gethostbyname_r_6+y} diff --git a/configure.ac b/configure.ac index 94e18f9faa1..0ab295b0f52 100644 --- a/configure.ac +++ b/configure.ac @@ -2160,8 +2160,6 @@ fi dnl **** Check for types **** -AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>]) - AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style], wine_cv_linux_gethostbyname_r_6, AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],[[ diff --git a/dlls/ntdll/unix/cdrom.c b/dlls/ntdll/unix/cdrom.c index f4f11c8e62f..53bf2e1b552 100644 --- a/dlls/ntdll/unix/cdrom.c +++ b/dlls/ntdll/unix/cdrom.c @@ -1631,9 +1631,6 @@ static NTSTATUS CDROM_ScsiPassThroughDirect(int fd, PSCSI_PASS_THROUGH_DIRECT pP #ifdef SENSEBUFLEN if (pPacket->SenseInfoLength > SENSEBUFLEN) return STATUS_INVALID_PARAMETER; -#elif defined HAVE_REQUEST_SENSE - if (pPacket->SenseInfoLength > sizeof(struct request_sense)) - return STATUS_INVALID_PARAMETER; #endif if (pPacket->DataTransferLength > 0 && !pPacket->DataBuffer) @@ -1760,9 +1757,6 @@ static NTSTATUS CDROM_ScsiPassThrough(int fd, PSCSI_PASS_THROUGH pPacket) #ifdef SENSEBUFLEN if (pPacket->SenseInfoLength > SENSEBUFLEN) return STATUS_INVALID_PARAMETER; -#elif defined HAVE_REQUEST_SENSE - if (pPacket->SenseInfoLength > sizeof(struct request_sense)) - return STATUS_INVALID_PARAMETER; #endif if (pPacket->DataTransferLength > 0 && pPacket->DataBufferOffset < sizeof(SCSI_PASS_THROUGH)) diff --git a/include/config.h.in b/include/config.h.in index 84e71120248..b3d9777d1f4 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -351,9 +351,6 @@ /* Define to 1 if you have the <pwd.h> header file. */ #undef HAVE_PWD_H -/* Define to 1 if the system has the type 'request_sense'. */ -#undef HAVE_REQUEST_SENSE - /* Define if you have the resolver library and header */ #undef HAVE_RESOLV -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9264