Remove the check for stat()

It's POSIX-2001 standard
This commit is contained in:
Chris Robinson
2020-03-21 08:39:45 -07:00
parent 12775513ae
commit adf28d87aa
4 changed files with 0 additions and 9 deletions
-2
View File
@@ -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.
-2
View File
@@ -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);
-2
View File
@@ -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;
-3
View File
@@ -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}