Add more POSIX compliance macros to fix uClibc support

- Add POSIX 1993.09 compliance macro in source files that use
  "struct timespec";
- Add POSIX 2001.12 compliance macro in source files that use
  "struct sigaction" and the SA_SIGINFO macro, or the fchmod()
  function;
- Add POSIX 2008.09 compliance macro in source files that use the
  getline() function.

These compliance macros are enough for wlroots to compile with the
git-master version of uClibc-ng.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This commit is contained in:
Paul Cercueil 2024-02-06 11:54:29 +01:00
parent 9e426e70e6
commit 220df2aa0f
No known key found for this signature in database
GPG key ID: 73EE6BD2274ABD41
26 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdint.h>
#include <stdio.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <drm_fourcc.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <drm_fourcc.h>
#include <GLES2/gl2.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <stdlib.h>
#include "wlr/types/wlr_compositor.h"
#include <wlr/types/wlr_scene.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <stdlib.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_layer_shell_v1.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <stdlib.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xdg_shell.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wlr/types/wlr_cursor_shape_v1.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wlr/types/wlr_idle_notify_v1.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wlr/types/wlr_compositor.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <limits.h>
#include <pixman.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wlr/types/wlr_primary_selection.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <inttypes.h>
#include <stdlib.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <drm_fourcc.h>

View file

@ -1,3 +1,6 @@
#if !defined(__FreeBSD__)
#define _POSIX_C_SOURCE 200112L
#endif
#define _DEFAULT_SOURCE // for MAP_ANONYMOUS
#include <assert.h>
#include <drm_fourcc.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wayland-util.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wlr/interfaces/wlr_pointer.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <wlr/util/edges.h>

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include "types/wlr_xdg_shell.h"

View file

@ -1,3 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
#include <stdlib.h>
#include <string.h>

View file

@ -23,6 +23,7 @@
* SOFTWARE.
*/
#define _POSIX_C_SOURCE 200809L
#define _DEFAULT_SOURCE
#include <stdbool.h>
#include <stdio.h>