kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Fix some compiler errors & warnings caused & revealed by GLIBC 2.38 & GCC 13.
rodzic
cca5b5e226
commit
69fc23707a
2
utils.c
2
utils.c
|
@ -2211,7 +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__)
|
||||
#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 38)) || (__GLIBC__ >= 3)
|
||||
/* nothing here */
|
||||
#else
|
||||
int strlcpy(char *dst, const char *src, int sz)
|
||||
|
|
4
utils.h
4
utils.h
|
@ -56,7 +56,7 @@ void remove_trailing_chars(char *, int);
|
|||
/* if substr is too short). */
|
||||
void str_insert_substr(char *str, int pos, int len, const char *substr, int subpos, int sublen);
|
||||
|
||||
/* Replaces the nth occurence of dest_substr in str with src_substr. */
|
||||
/* Replaces the nth occurrence of dest_substr in str with src_substr. */
|
||||
/* If n = -1, all occurrences will be replaced. */
|
||||
/* len is the buffer length, not the string length! */
|
||||
/* Returns the number of substrings replaced. */
|
||||
|
@ -145,7 +145,7 @@ int t_lcm(int, int); /* returns least common multiple */
|
|||
* 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__)
|
||||
#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 38)) || (__GLIBC__ >= 3)
|
||||
/* nothing here */
|
||||
#else
|
||||
int strlcpy(char *, const char *, int);
|
||||
|
|
Ładowanie…
Reference in New Issue