summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/include/mntent.h12
2 files changed, 14 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8594dd1b1..18b110dda 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/mntent.h: Only include paths.h when building for Cygwin.
+ Add comment to explain why.
+
2012-11-11 Corinna Vinschen <corinna@vinschen.de>
* winbase.h: Semi-reinstantiate to workaround lack inline assembler
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