]> git.ipfire.org Git - thirdparty/systemd.git/blame - klibc_fixups.c
[PATCH] add some documentation for the %b modifier to the default config file.
[thirdparty/systemd.git] / klibc_fixups.c
CommitLineData
1e959a4b
GKH
1
2#ifdef __KLIBC__
3
4#include <stdlib.h>
5#include <string.h>
6#include <ctype.h>
7
8char *strerror(int errnum)
9{
10 return "some error";
11}
12
13int strcasecmp(const char *s1, const char *s2)
14{
15 char *n1;
16 char *n2;
17 int retval;
18 int i;
19
20 n1 = strdup(s1);
21 n2 = strdup(s2);
22
23 for (i = 0; i < strlen(n1); ++i)
24 n1[i] = toupper(n1[i]);
25 for (i = 0; i < strlen(n2); ++i)
26 n2[i] = toupper(n2[i]);
27 retval = strcmp(n1, n2);
28 free(n1);
29 free(n2);
30 return retval;
31}
32
33#endif