aboutsummaryrefslogtreecommitdiffstats
path: root/cursor/os-compatibility.h
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2012-07-10 13:05:02 +0300
committerKristian Høgsberg <krh@bitplanet.net>2012-07-10 14:08:59 -0400
commita88a4386cbf5f3a627345f12683210c3b81b292b (patch)
tree2cda8cfaf635c3d3494c2303e7cb79ec63872911 /cursor/os-compatibility.h
parentserver: fix wl_seat_set_keyboard (diff)
downloadwayland-a88a4386cbf5f3a627345f12683210c3b81b292b.tar
wayland-a88a4386cbf5f3a627345f12683210c3b81b292b.tar.gz
wayland-a88a4386cbf5f3a627345f12683210c3b81b292b.tar.bz2
wayland-a88a4386cbf5f3a627345f12683210c3b81b292b.tar.lz
wayland-a88a4386cbf5f3a627345f12683210c3b81b292b.tar.xz
wayland-a88a4386cbf5f3a627345f12683210c3b81b292b.tar.zst
wayland-a88a4386cbf5f3a627345f12683210c3b81b292b.zip
cursor: use os_create_anonymous_file()
Copy the implementation of os_create_anonymous_file() here from weston, so we can use it instead of hardcoding a path to /tmp. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Diffstat (limited to 'cursor/os-compatibility.h')
-rw-r--r--cursor/os-compatibility.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/cursor/os-compatibility.h b/cursor/os-compatibility.h
new file mode 100644
index 0000000..947555c
--- /dev/null
+++ b/cursor/os-compatibility.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright © 2012 Collabora, Ltd.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef OS_COMPATIBILITY_H
+#define OS_COMPATIBILITY_H
+
+#include <sys/types.h>
+
+int
+os_create_anonymous_file(off_t size);
+
+#endif /* OS_COMPATIBILITY_H */