diff --git a/include/backend.h b/include/backend.h
index 8f6ff39..c3bb0a6 100644
--- a/include/backend.h
+++ b/include/backend.h
@@ -1,6 +1,14 @@
 #ifndef _SEATD_BACKEND_H
 #define _SEATD_BACKEND_H
 
+#ifndef O_CLOEXEC
+#define O_CLOEXEC	02000000
+#endif
+
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW	00400000
+#endif
+
 #include "libseat.h"
 
 struct seat_impl;
diff --git a/include/connection.h b/include/connection.h
index d32e766..3dc6fc8 100644
--- a/include/connection.h
+++ b/include/connection.h
@@ -4,6 +4,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC	0x40000000
+#endif
+
 #define CONNECTION_BUFFER_SIZE 256
 
 #define MAX_FDS (CONNECTION_BUFFER_SIZE / sizeof(int))
diff --git a/include/evdev.h b/include/evdev.h
index 5e6cfbf..54b0a83 100644
--- a/include/evdev.h
+++ b/include/evdev.h
@@ -1,6 +1,9 @@
 #ifndef _SEATD_EVDEV_H
 #define _SEATD_EVDEV_H
 
+#ifndef EVIOCREVOKE
+#define EVIOCREVOKE _IOW('E', 0x91, int)
+#endif
 int evdev_revoke(int fd);
 int path_is_evdev(const char *path);
 
diff --git a/include/seat.h b/include/seat.h
index ff857e7..2cf1a25 100644
--- a/include/seat.h
+++ b/include/seat.h
@@ -7,6 +7,14 @@
 
 #include "linked_list.h"
 
+#ifndef O_CLOEXEC
+#define O_CLOEXEC	02000000
+#endif
+
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW	00400000
+#endif
+
 struct client;
 
 enum seat_device_type {
diff --git a/include/terminal.h b/include/terminal.h
index fb46ce3..854a1cd 100644
--- a/include/terminal.h
+++ b/include/terminal.h
@@ -1,6 +1,10 @@
 #ifndef _SEATD_TERMINAL_H
 #define _SEATD_TERMINAL_H
 
+#ifndef K_OFF
+#define K_OFF 4
+#endif
+
 #include <stdbool.h>
 
 int terminal_open(int vt);
