summary refs log tree commit diff
path: root/locale/findlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/findlocale.c')
-rw-r--r--locale/findlocale.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/locale/findlocale.c b/locale/findlocale.c
index e2fdd06f6d..af2b36439e 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -21,7 +21,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <sys/mman.h>
+#ifdef _POSIX_MAPPED_FILES
+# include <sys/mman.h>
+#endif
 
 #include "localeinfo.h"
 
@@ -211,6 +213,7 @@ _nl_remove_locale (int locale, struct locale_data *data)
       /* Free the name.  */
       free ((char *) data->name);
 
+#ifdef _POSIX_MAPPED_FILES
       /* Really delete the data.  First delete the real data.  */
       if (data->mmaped)
 	{
@@ -223,6 +226,7 @@ _nl_remove_locale (int locale, struct locale_data *data)
 	    }
 	}
       else
+#endif	/* _POSIX_MAPPED_FILES */
 	/* The memory was malloced.  */
 	free ((void *) data->filedata);