libreplace: include sys/file.h only when available
authorBjörn Jacke <bj@sernet.de>
Sun, 30 May 2010 19:52:39 +0000 (21:52 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 17 Jun 2011 19:01:19 +0000 (21:01 +0200)
thanks to Joachim Schmitz <schmitz@hp.com>. This fixes #7460.

lib/replace/system/config.m4
lib/replace/system/filesys.h

index 39c2f58283b07e0c96080525aa5caa24f3506665..b8568a5165079cd10361a1971061eda0ffa747a3 100644 (file)
@@ -1,7 +1,7 @@
 # filesys
 AC_HEADER_DIRENT 
 AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h)
-AC_CHECK_HEADERS(sys/acl.h acl/libacl.h)
+AC_CHECK_HEADERS(sys/acl.h acl/libacl.h sys/file.h)
 
 # select
 AC_CHECK_HEADERS(sys/select.h)
index 22e3d23f3e79a8ed2ee32728d99c1bfd6109073c..6cf2dd287ada1d4b79b7b54c83e363a05414899b 100644 (file)
@@ -77,7 +77,9 @@
 #include <sys/filio.h>
 #endif
 
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
+#endif
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>