#ifdef SENSEBUFLEN
if (pPacket->SenseInfoLength > SENSEBUFLEN)
+#elif defined( __APPLE__ )
+ if (pPacket->SenseInfoLength > kSenseDefaultSize)
#else
if (pPacket->SenseInfoLength > sizeof(struct request_sense))
#endif
Please do not introduce even more platform dependent #ifdefs into cdrom.c,
currently it already has enough mess with all that #if defined(linux)/(__FreeBSD__)/
(__NetBSD__). Add proper configure checks for headers and structures your
platform needs.
To be sure I get you right: would changing __APPLE__ to HAVE_IOKIT (and
adding HAVE_IOKIT detection to configure) be sufficient?