st/xa: Fix crosscompile builds with nonstandard ld locations
[mesa.git] / src / egl / main / eglstring.c
1 /**
2 * String utils.
3 */
4
5 #include <stdlib.h>
6 #include <string.h>
7 #include "eglstring.h"
8
9
10 char *
11 _eglstrdup(const char *s)
12 {
13 if (s) {
14 size_t l = strlen(s);
15 char *s2 = malloc(l + 1);
16 if (s2)
17 strcpy(s2, s);
18 return s2;
19 }
20 return NULL;
21 }
22
23
24