1From cf37ba4c0bf31316b698ba23015f91903766871d Mon Sep 17 00:00:00 2001 2From: Paul Cercueil <paul@crapouillou.net> 3Date: Thu, 18 Feb 2021 22:31:39 +0000 4Subject: [PATCH] Add feature macros to more C files 5 6These source files use "struct timespec", which is POSIX 1993.09. 7 8Signed-off-by: Paul Cercueil <paul@crapouillou.net> 9 10[Retrieved from: https://github.com/swaywm/wlroots/pull/2493] 11Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 12--- 13 backend/wayland/output.c | 1 + 14 types/data_device/wlr_data_device.c | 1 + 15 types/data_device/wlr_drag.c | 1 + 16 types/wlr_export_dmabuf_v1.c | 1 + 17 types/wlr_idle.c | 1 + 18 types/wlr_keyboard_shortcuts_inhibit_v1.c | 1 + 19 types/wlr_pointer_constraints_v1.c | 1 + 20 types/wlr_primary_selection.c | 1 + 21 types/wlr_relative_pointer_v1.c | 1 + 22 types/wlr_screencopy_v1.c | 1 + 23 types/wlr_virtual_pointer_v1.c | 1 + 24 types/wlr_xdg_decoration_v1.c | 1 + 25 types/xdg_shell/wlr_xdg_popup.c | 1 + 26 types/xdg_shell/wlr_xdg_positioner.c | 1 + 27 types/xdg_shell/wlr_xdg_shell.c | 1 + 28 types/xdg_shell/wlr_xdg_surface.c | 1 + 29 16 files changed, 16 insertions(+) 30 31diff --git a/backend/wayland/output.c b/backend/wayland/output.c 32index d5410e0d32..8ff8fa2a00 100644 33--- a/backend/wayland/output.c 34+++ b/backend/wayland/output.c 35@@ -1,3 +1,4 @@ 36+#define _POSIX_C_SOURCE 199309L 37 #include <assert.h> 38 #include <stdint.h> 39 #include <stdio.h> 40diff --git a/types/data_device/wlr_data_device.c b/types/data_device/wlr_data_device.c 41index 6cd84ec0ab..beac496124 100644 42--- a/types/data_device/wlr_data_device.c 43+++ b/types/data_device/wlr_data_device.c 44@@ -1,3 +1,4 @@ 45+#define _POSIX_C_SOURCE 199309L 46 #include <assert.h> 47 #include <stdlib.h> 48 #include <string.h> 49diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c 50index 53bf4066a1..e3c1e249b4 100644 51--- a/types/data_device/wlr_drag.c 52+++ b/types/data_device/wlr_drag.c 53@@ -1,3 +1,4 @@ 54+#define _POSIX_C_SOURCE 199309L 55 #include <assert.h> 56 #include <stdlib.h> 57 #include <string.h> 58diff --git a/types/wlr_export_dmabuf_v1.c b/types/wlr_export_dmabuf_v1.c 59index a8e2a4bde3..98ceae68f1 100644 60--- a/types/wlr_export_dmabuf_v1.c 61+++ b/types/wlr_export_dmabuf_v1.c 62@@ -1,3 +1,4 @@ 63+#define _POSIX_C_SOURCE 199309L 64 #include <assert.h> 65 #include <stdlib.h> 66 #include <unistd.h> 67diff --git a/types/wlr_idle.c b/types/wlr_idle.c 68index 4c338931cc..80fd871fab 100644 69--- a/types/wlr_idle.c 70+++ b/types/wlr_idle.c 71@@ -1,3 +1,4 @@ 72+#define _POSIX_C_SOURCE 199309L 73 #include <assert.h> 74 #include <stdlib.h> 75 #include <string.h> 76diff --git a/types/wlr_keyboard_shortcuts_inhibit_v1.c b/types/wlr_keyboard_shortcuts_inhibit_v1.c 77index fe4e64b04e..8360a9c21c 100644 78--- a/types/wlr_keyboard_shortcuts_inhibit_v1.c 79+++ b/types/wlr_keyboard_shortcuts_inhibit_v1.c 80@@ -1,3 +1,4 @@ 81+#define _POSIX_C_SOURCE 199309L 82 #include <assert.h> 83 #include <stdlib.h> 84 #include <util/signal.h> 85diff --git a/types/wlr_pointer_constraints_v1.c b/types/wlr_pointer_constraints_v1.c 86index eca45984c4..f1db8e3415 100644 87--- a/types/wlr_pointer_constraints_v1.c 88+++ b/types/wlr_pointer_constraints_v1.c 89@@ -1,3 +1,4 @@ 90+#define _POSIX_C_SOURCE 199309L 91 #include <assert.h> 92 #include <limits.h> 93 #include <pixman.h> 94diff --git a/types/wlr_primary_selection.c b/types/wlr_primary_selection.c 95index 0875462c8c..7e0e11ddaa 100644 96--- a/types/wlr_primary_selection.c 97+++ b/types/wlr_primary_selection.c 98@@ -1,3 +1,4 @@ 99+#define _POSIX_C_SOURCE 199309L 100 #include <assert.h> 101 #include <stdlib.h> 102 #include <wlr/types/wlr_primary_selection.h> 103diff --git a/types/wlr_relative_pointer_v1.c b/types/wlr_relative_pointer_v1.c 104index 8613f2b91c..3f8dd8b72a 100644 105--- a/types/wlr_relative_pointer_v1.c 106+++ b/types/wlr_relative_pointer_v1.c 107@@ -1,3 +1,4 @@ 108+#define _POSIX_C_SOURCE 199309L 109 #include <assert.h> 110 #include <inttypes.h> 111 #include <stdlib.h> 112diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c 113index 6feb074274..29864c2364 100644 114--- a/types/wlr_screencopy_v1.c 115+++ b/types/wlr_screencopy_v1.c 116@@ -1,3 +1,4 @@ 117+#define _POSIX_C_SOURCE 199309L 118 #include <assert.h> 119 #include <stdlib.h> 120 #include <drm_fourcc.h> 121diff --git a/types/wlr_virtual_pointer_v1.c b/types/wlr_virtual_pointer_v1.c 122index a9d1fd7bc4..5566e9e013 100644 123--- a/types/wlr_virtual_pointer_v1.c 124+++ b/types/wlr_virtual_pointer_v1.c 125@@ -1,3 +1,4 @@ 126+#define _POSIX_C_SOURCE 199309L 127 #include <assert.h> 128 #include <stdlib.h> 129 #include <wlr/types/wlr_seat.h> 130diff --git a/types/wlr_xdg_decoration_v1.c b/types/wlr_xdg_decoration_v1.c 131index 544035b7b8..904474c088 100644 132--- a/types/wlr_xdg_decoration_v1.c 133+++ b/types/wlr_xdg_decoration_v1.c 134@@ -1,3 +1,4 @@ 135+#define _POSIX_C_SOURCE 199309L 136 #include <assert.h> 137 #include <stdbool.h> 138 #include <stdlib.h> 139diff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c 140index 69b4cfe19f..05d6551fc8 100644 141--- a/types/xdg_shell/wlr_xdg_popup.c 142+++ b/types/xdg_shell/wlr_xdg_popup.c 143@@ -1,3 +1,4 @@ 144+#define _POSIX_C_SOURCE 199309L 145 #include <assert.h> 146 #include <stdlib.h> 147 #include <string.h> 148diff --git a/types/xdg_shell/wlr_xdg_positioner.c b/types/xdg_shell/wlr_xdg_positioner.c 149index f88bf323b8..8881c49916 100644 150--- a/types/xdg_shell/wlr_xdg_positioner.c 151+++ b/types/xdg_shell/wlr_xdg_positioner.c 152@@ -1,3 +1,4 @@ 153+#define _POSIX_C_SOURCE 199309L 154 #include <assert.h> 155 #include <stdlib.h> 156 #include "types/wlr_xdg_shell.h" 157diff --git a/types/xdg_shell/wlr_xdg_shell.c b/types/xdg_shell/wlr_xdg_shell.c 158index 0480d5f354..c93fe7c3fb 100644 159--- a/types/xdg_shell/wlr_xdg_shell.c 160+++ b/types/xdg_shell/wlr_xdg_shell.c 161@@ -1,3 +1,4 @@ 162+#define _POSIX_C_SOURCE 199309L 163 #include <assert.h> 164 #include <stdlib.h> 165 #include "types/wlr_xdg_shell.h" 166diff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c 167index edf562abcd..c1dfbfba7e 100644 168--- a/types/xdg_shell/wlr_xdg_surface.c 169+++ b/types/xdg_shell/wlr_xdg_surface.c 170@@ -1,3 +1,4 @@ 171+#define _POSIX_C_SOURCE 199309L 172 #include <assert.h> 173 #include <stdlib.h> 174 #include <string.h> 175