mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[all] fix client build on linux
This commit is contained in:
parent
ccd0a0bcf9
commit
e0bdd869d6
@ -109,6 +109,7 @@ static bool egl_texFBUpdate(EGL_Texture * texture, const EGL_TexUpdate * update)
|
||||
rectsFramebufferToBuffer(
|
||||
damage->rects,
|
||||
damage->count,
|
||||
texture->format.bpp,
|
||||
parent->buf[parent->bufIndex].map,
|
||||
texture->format.stride,
|
||||
texture->format.height,
|
||||
|
@ -35,6 +35,6 @@ int alloc_sprintf(char ** str, const char * format, ...)
|
||||
bool str_containsValue(const char * list, char delimiter, const char * value);
|
||||
|
||||
// Local implementation of strdup
|
||||
char * strdup(const char *s);
|
||||
char * lg_strdup(const char *s);
|
||||
|
||||
#endif
|
||||
|
@ -80,7 +80,7 @@ static bool float_parser(struct Option * opt, const char * str)
|
||||
static bool string_parser(struct Option * opt, const char * str)
|
||||
{
|
||||
free(opt->value.x_string);
|
||||
opt->value.x_string = strdup(str);
|
||||
opt->value.x_string = lg_strdup(str);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ static char * int_toString(struct Option * opt)
|
||||
|
||||
static char * bool_toString(struct Option * opt)
|
||||
{
|
||||
return strdup(opt->value.x_bool ? "yes" : "no");
|
||||
return lg_strdup(opt->value.x_bool ? "yes" : "no");
|
||||
}
|
||||
|
||||
static char * float_toString(struct Option * opt)
|
||||
@ -122,7 +122,7 @@ static char * string_toString(struct Option * opt)
|
||||
if (!opt->value.x_string)
|
||||
return NULL;
|
||||
|
||||
return strdup(opt->value.x_string);
|
||||
return lg_strdup(opt->value.x_string);
|
||||
}
|
||||
|
||||
bool option_register(struct Option options[])
|
||||
@ -211,7 +211,7 @@ bool option_register(struct Option options[])
|
||||
{
|
||||
if (o->value.x_string)
|
||||
{
|
||||
o->value.x_string = strdup(o->value.x_string);
|
||||
o->value.x_string = lg_strdup(o->value.x_string);
|
||||
if (!o->value.x_string)
|
||||
{
|
||||
DEBUG_ERROR("out of memory");
|
||||
@ -368,7 +368,7 @@ bool option_parse(int argc, char * argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
char * arg = strdup(argv[a]);
|
||||
char * arg = lg_strdup(argv[a]);
|
||||
char * module = strtok(arg , ":");
|
||||
char * name = strtok(NULL, "=");
|
||||
value = strtok(NULL, "" );
|
||||
@ -778,7 +778,7 @@ void option_print(void)
|
||||
char * value = o->toString(o);
|
||||
if (!value)
|
||||
{
|
||||
value = strdup("NULL");
|
||||
value = lg_strdup("NULL");
|
||||
len = 4;
|
||||
}
|
||||
else
|
||||
@ -977,7 +977,7 @@ void option_set_string(const char * module, const char * name, const char * valu
|
||||
}
|
||||
DEBUG_ASSERT(o->type == OPTION_TYPE_STRING);
|
||||
free(o->value.x_string);
|
||||
o->value.x_string = strdup(value);
|
||||
o->value.x_string = lg_strdup(value);
|
||||
}
|
||||
|
||||
void option_set_bool(const char * module, const char * name, bool value)
|
||||
|
@ -91,7 +91,7 @@ bool str_containsValue(const char * list, char delimiter, const char * value)
|
||||
return false;
|
||||
}
|
||||
|
||||
char * strdup(const char *s)
|
||||
char * lg_strdup(const char *s)
|
||||
{
|
||||
if (!s)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user