Remove the check for stat()
It's POSIX-2001 standard
This commit is contained in:
@@ -447,8 +447,6 @@ CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
|
||||
CHECK_SYMBOL_EXISTS(_aligned_malloc malloc.h HAVE__ALIGNED_MALLOC)
|
||||
CHECK_SYMBOL_EXISTS(proc_pidpath libproc.h HAVE_PROC_PIDPATH)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(stat HAVE_STAT)
|
||||
|
||||
IF(NOT WIN32)
|
||||
# We need pthreads outside of Windows, for semaphores. It's also used to
|
||||
# set the priority and name of threads, when possible.
|
||||
|
||||
@@ -674,10 +674,8 @@ void OSSBackendFactory::probe(DevProbe type, std::string *outnames)
|
||||
{
|
||||
auto add_device = [outnames](const DevMap &entry) -> void
|
||||
{
|
||||
#ifdef HAVE_STAT
|
||||
struct stat buf;
|
||||
if(stat(entry.device_name.c_str(), &buf) == 0)
|
||||
#endif
|
||||
{
|
||||
/* Includes null char. */
|
||||
outnames->append(entry.name.c_str(), entry.name.length()+1);
|
||||
|
||||
@@ -276,10 +276,8 @@ void SolarisBackendFactory::probe(DevProbe type, std::string *outnames)
|
||||
{
|
||||
case DevProbe::Playback:
|
||||
{
|
||||
#ifdef HAVE_STAT
|
||||
struct stat buf;
|
||||
if(stat(solaris_driver.c_str(), &buf) == 0)
|
||||
#endif
|
||||
outnames->append(solaris_device, sizeof(solaris_device));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -74,9 +74,6 @@
|
||||
/* Define if we have the SDL2 backend */
|
||||
#cmakedefine HAVE_SDL2
|
||||
|
||||
/* Define if we have the stat function */
|
||||
#cmakedefine HAVE_STAT
|
||||
|
||||
/* Define to the size of a long int type */
|
||||
#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user