libroot: define restrict for GCC < 4.

Should fix GCC 2 build.
This commit is contained in:
Augustin Cavalier
2025-02-24 16:14:26 -05:00
parent 0b67b191c5
commit 4b099fb795
2 changed files with 8 additions and 0 deletions
@@ -1,5 +1,9 @@
#include <string.h>
#if __GNUC__ < 4
#define restrict
#endif
char *strcat(char *restrict dest, const char *restrict src)
{
strcpy(dest + strlen(dest), src);
@@ -1,5 +1,9 @@
#include <string.h>
#if __GNUC__ < 4
#define restrict
#endif
char *strncat(char *restrict d, const char *restrict s, size_t n)
{
char *a = d;