summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/mntent.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/include/mntent.h')
-rw-r--r--winsup/cygwin/include/mntent.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h
index 5fb8e3a70..db87904ef 100644
--- a/winsup/cygwin/include/mntent.h
+++ b/winsup/cygwin/include/mntent.h
@@ -1,6 +1,6 @@
/* mntent.h
- Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010 Red Hat, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010, 2012 Red Hat, Inc.
This file is part of Cygwin.
@@ -15,8 +15,6 @@ details. */
extern "C" {
#endif
-#include <paths.h>
-
struct mntent
{
char *mnt_fsname;
@@ -35,6 +33,12 @@ struct mntent *getmntent_r (FILE *, struct mntent *, char *, int);
int endmntent (FILE *__filep);
#endif
+#ifdef __CYGWIN__
+/* Only include paths.h if building for Cygwin. This avoids including
+ newlib headers when building the native tools in winsup/utils. */
+
+#include <paths.h>
+
/* The following two defines are deprecated. Use the equivalent
names from paths.h instead. */
#ifndef MNTTAB
@@ -48,6 +52,8 @@ int endmntent (FILE *__filep);
#define MOUNTED _PATH_MOUNTED
#endif
+#endif /* __CYGWIN__ */
+
#ifdef __cplusplus
};
#endif