sysdep_routines += nacl_interface_query \
nacl-interfaces $(nacl-interface-routines)
+# The Linux bits are close enough for NaCl and we want to use the existing
+# file rather than copying it into sysdeps/nacl and letting it bit rot.
+# But we certainly don't want sysdeps/unix/sysv/linux in our sysdirs list!
+# So copy the file to the build directory.
+sysdep_headers += bits/mman-linux.h
+before-compile += $(common-objpfx)bits/mman-linux.h
+$(common-objpfx)bits/mman-linux.h: \
+ $(..)sysdeps/unix/sysv/linux/bits/mman-linux.h
+ $(make-target-directory)
+ ln -f $< $@ || cp -f $< $@
+
# XXX temp test
others += hello
--- /dev/null
+/* Definitions for POSIX memory map interface. NaCl version.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* NaCl uses the Linux bits for this. */
+#include <bits/mman-linux.h>