Fix some compiler errors & warnings caused & revealed by GLIBC 2.38 & GCC 13.

master
Teuniz 2023-09-10 08:18:12 +02:00
rodzic 013b72dbbf
commit ab76204a40
2 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -2211,9 +2211,7 @@ char * strtok_r_e(char *str, const char *delim, char **saveptr)
* plus the length of src. While this may seem somewhat confusing,
* it was done to make truncation detection simple."
*/
#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 38)) || (__GLIBC__ >= 3)
/* nothing here */
#else
#ifdef HAS_NO_STRLC
int strlcpy(char *dst, const char *src, int sz)
{
int srclen;

Wyświetl plik

@ -148,6 +148,7 @@ int t_lcm(int, int); /* returns least common multiple */
#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 38)) || (__GLIBC__ >= 3)
/* nothing here */
#else
#define HAS_NO_STRLC
int strlcpy(char *, const char *, int);
int strlcat(char *, const char *, int);
#endif