diff mbox

[FFmpeg-devel] configure: include unistd.h in the access() check

Message ID 20180507225245.62329-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer May 7, 2018, 10:52 p.m. UTC
This should make sure detection only succeeds on systems where we expect
it will be used.

Signed-off-by: James Almer <jamrial@gmail.com>
The current access() test succeeds on systems lacking unistd.h, like msvc.
This results in the scrnn_filter being enabled but ultimately failing to
compile, as POSIX constants like R_OK are expected to also be present.

libavformat/os_support.h has a wrapper for win32 targets using a msvc
specific implementation of the function, but it can't be used in

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox


diff --git a/configure b/configure
index 7c143238a8..3d051a5826 100755
--- a/configure
+++ b/configure
@@ -5761,7 +5761,7 @@  check_func_headers malloc.h _aligned_malloc     && enable aligned_malloc
 check_func  ${malloc_prefix}memalign            && enable memalign
 check_func  ${malloc_prefix}posix_memalign      && enable posix_memalign
-check_func  access
+check_func_headers unistd.h access
 check_func_headers stdlib.h arc4random
 check_lib   clock_gettime time.h clock_gettime || check_lib clock_gettime time.h clock_gettime -lrt
 check_func  fcntl