From 57a3e9c1c7507b5ce56122429cc3649009a4ecc7 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 15 Dec 2023 16:08:12 +0100 Subject: Remove superfluous includes This should fix #32 --- include/fortify-headers.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/fortify-headers.h') diff --git a/include/fortify-headers.h b/include/fortify-headers.h index c7b15f9..bd53954 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h @@ -123,13 +123,17 @@ #endif /* __has_attribute */ +// Since we're not allow to include anything. +// https://awesomekling.github.io/How-SerenityOS-declares-ssize_t/ +#define __fh_size_t __typeof__(sizeof(char)) + //TODO(jvoisin) Add a check for overflows /* check if pointers are overlapping but not if dst == src, * since gcc seems to like to generate code that relies on dst == src */ #define __fh_overlap(a, b, l) \ ( \ - ((a) < (b) && (b) < (a) + (size_t)(l)) \ - || ((b) < (a) && (a) < (b) + (size_t)(l)) \ + ((a) < (b) && (b) < (a) + (__fh_size_t)(l)) \ + || ((b) < (a) && (a) < (b) + (__fh_size_t)(l)) \ ) /* -- cgit v1.3