Skip to content

Commit

Permalink
Only include the <sys/param.h> header if available
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sortie authored and kumpera committed Jun 26, 2014
1 parent 6479266 commit c765c61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mono/io-layer/processes.c
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions support/grp.c
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions support/sys-statvfs.c
Expand Up @@ -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 */
Expand Down

0 comments on commit c765c61

Please sign in to comment.