Skip to content
Snippets Groups Projects
Commit ea768264 authored by Sal's avatar Sal
Browse files

Merge branch 'fix-glibc-238' into 'master'

Fix glibc 2.38 compile

See merge request !2092
parents c29999ae b120d00c
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,11 @@ int endswith (const char *base, const char *tag);
#define HAVE_DOSSTR_FUNCS
#endif
// glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE
#if defined (__APPLE__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38)
#define HAVE_STRLCPY
#endif
#ifndef HAVE_DOSSTR_FUNCS
int strupr(char *n); // from dosstr.c
int strlwr(char *n); // from dosstr.c
......@@ -129,7 +134,7 @@ int strlwr(char *n); // from dosstr.c
#include <stddef.h> // for size_t
#ifndef __APPLE__
#ifndef HAVE_STRLCPY
size_t strlcat(char *dst, const char *src, size_t siz);
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
......
......@@ -15,7 +15,7 @@
#include <string.h>
#include "doomdef.h"
#if !defined (__APPLE__)
#ifndef HAVE_STRLCPY
// Like the OpenBSD version, but it doesn't check for src not being a valid
// C string.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment