X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Finterface%2Fintf_eject.c;h=87b9f7c5089fff2bb5625d947c7032e99216c6ff;hb=f71d55dd356d9f1fb225f221adeb1ee8e5dc3aee;hp=0d209cec4fea2ca702262bf1e6aebf2351b77c85;hpb=bf5fd2c75e4e433fda8950b73ee33dd422252603;p=vlc diff --git a/src/interface/intf_eject.c b/src/interface/intf_eject.c index 0d209cec4f..87b9f7c508 100644 --- a/src/interface/intf_eject.c +++ b/src/interface/intf_eject.c @@ -29,7 +29,11 @@ * This file contain functions to eject CD and DVD drives */ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include #ifdef HAVE_UNISTD_H # include @@ -43,7 +47,7 @@ # include #endif -#if defined(SYS_LINUX) && defined(HAVE_LINUX_VERSION_H) +#if defined(__linux__) && defined(HAVE_LINUX_VERSION_H) # include /* handy macro found in 2.1 kernels, but not in older ones */ # ifndef KERNEL_VERSION @@ -76,7 +80,7 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -#if defined(SYS_LINUX) && defined(HAVE_LINUX_VERSION_H) +#if defined(__linux__) && defined(HAVE_LINUX_VERSION_H) static int EjectSCSI ( int i_fd ); #endif @@ -96,6 +100,7 @@ static int EjectSCSI ( int i_fd ); */ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) { + VLC_UNUSED(p_this); int i_ret = VLC_SUCCESS; #ifdef __APPLE__ @@ -187,7 +192,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) return VLC_EGENERIC; } -#if defined(SYS_LINUX) && defined(HAVE_LINUX_VERSION_H) +#if defined(__linux__) && defined(HAVE_LINUX_VERSION_H) /* Try a simple ATAPI eject */ i_ret = ioctl( i_fd, CDROMEJECT, 0 ); @@ -217,7 +222,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) /* The following functions are local */ -#if defined(SYS_LINUX) && defined(HAVE_LINUX_VERSION_H) +#if defined(__linux__) && defined(HAVE_LINUX_VERSION_H) /***************************************************************************** * Eject using SCSI commands. Return 0 if successful *****************************************************************************/