diff options
-rw-r--r-- | src/copy.c | 3 | ||||
-rw-r--r-- | src/install.c | 3 | ||||
-rw-r--r-- | src/ptx.c | 2 | ||||
-rw-r--r-- | src/system.h | 8 |
4 files changed, 9 insertions, 7 deletions
diff --git a/src/copy.c b/src/copy.c index a160952bb..9a014ad5a 100644 --- a/src/copy.c +++ b/src/copy.c @@ -19,6 +19,7 @@ #include <config.h> #include <stdio.h> #include <assert.h> +#include <sys/ioctl.h> #include <sys/types.h> #include <selinux/selinux.h> @@ -61,8 +62,6 @@ # include "verror.h" #endif -#include <sys/ioctl.h> - #ifndef HAVE_FCHOWN # define HAVE_FCHOWN false # define fchown(fd, uid, gid) (-1) diff --git a/src/install.c b/src/install.c index c34e4dcd9..cebb64278 100644 --- a/src/install.c +++ b/src/install.c @@ -24,6 +24,7 @@ #include <pwd.h> #include <grp.h> #include <selinux/selinux.h> +#include <sys/wait.h> #include "system.h" #include "backupfile.h" @@ -48,8 +49,6 @@ #define AUTHORS proper_name ("David MacKenzie") -#include <sys/wait.h> - static int selinux_enabled = 0; static bool use_default_selinux_context = true; @@ -22,13 +22,13 @@ #include <getopt.h> #include <sys/types.h> #include "system.h" +#include <regex.h> #include "argmatch.h" #include "diacrit.h" #include "error.h" #include "fadvise.h" #include "quote.h" #include "quotearg.h" -#include "regex.h" #include "stdio--.h" #include "xstrtol.h" diff --git a/src/system.h b/src/system.h index 3b32cbd6c..b86e57047 100644 --- a/src/system.h +++ b/src/system.h @@ -14,11 +14,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* Include this file _after_ system headers if possible. */ + #include <alloca.h> -/* Include sys/types.h before this file. */ +/* Include <sys/types.h> before this file. + Note this doesn't warn if we're included + before all system headers. */ -#if 2 <= __GLIBC__ && 2 <= __GLIBC_MINOR__ +#if 2 < __GLIBC__ || ( 2 == ___GLIBC__ && 2 <= __GLIBC_MINOR__ ) # if ! defined _SYS_TYPES_H you must include <sys/types.h> before including this file # endif |