Only include the <sys/param.h> header if available
authorJonas 'Sortie' Termansen <sortie@maxsi.org>
Mon, 23 Jun 2014 23:03:11 +0000 (01:03 +0200)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 26 Jun 2014 13:57:42 +0000 (09:57 -0400)
The <sys/param.h> header is non-standard and usually not required if it isn't
available.

This change is released under the MIT/X11 license.

mono/io-layer/processes.c
support/grp.c
support/sys-statvfs.c

index afbe440448bf6553e0f535520bab3ae2e94cd0cc..c65bf23813c0ce954166d7595113fdf40ca6a3e7 100644 (file)
@@ -24,7 +24,9 @@
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <fcntl.h>
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 #include <ctype.h>
 
 #ifdef HAVE_SYS_MKDEV_H
index 09aff343270d79148b7d626d06724e7b6bdac232..827bc550d938fa91252db4ca620d739b939cb508 100644 (file)
@@ -8,7 +8,9 @@
  */
 
 #include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 #include <grp.h>
 #include <stdio.h>
 #include <stdlib.h>
index 2096dcff251671ef4068bcba1c47b9f6558c4b19..e03152a773d95d4f12fe1fc7ad78b240b1cb8f60 100644 (file)
@@ -25,7 +25,9 @@
 #endif /* def HAVE_SYS_STATVFS_H */
 
 #ifdef HAVE_GETFSSTAT
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 #include <sys/ucred.h>
 #include <sys/mount.h>
 #include <unistd.h>     /* for pathconf */