Skip to content

Commit

Permalink
[all] fix client build on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Oct 21, 2023
1 parent ccd0a0b commit e0bdd86
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions client/renderers/EGL/texture_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion common/include/common/stringutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions common/src/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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)
Expand All @@ -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[])
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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, "" );
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion common/src/stringutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit e0bdd86

Please sign in to comment.