Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15:Update
orc
0002-Fix-build.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Fix-build.patch of Package orc
From: Antonio Larrosa <alarrosa@suse.com> The backporting of 0001-Use-vasprintf-if-available-for-error-messages-and.patch needs some further changes to build. I prefer to keep those changes separate for clarity. Index: orc-orc-0.4.28/orc/orcparse.c =================================================================== --- orc-orc-0.4.28.orig/orc/orcparse.c +++ orc-orc-0.4.28/orc/orcparse.c @@ -405,7 +405,16 @@ orc_parse_log_valist (OrcParser *parser, int len; if (parser->error_program != parser->program) { - sprintf(s, "In function %s:\n", parser->program->name); +#ifdef HAVE_VASPRINTF + char *s = NULL; + asprintf (&s, "In function %s:\n", parser->program->name); +#elif defined(_UCRT) + char s[100] = { '\0' }; + snprintf_s (s, 100, _TRUNCATE, "In function %s:\n", parser->program->name); +#else + char s[100] = { '\0' }; + snprintf (s, sizeof (s), "In function %s:\n", parser->program->name); +#endif len = strlen(s); if (parser->log_size + len + 1 >= parser->log_alloc) { @@ -416,6 +425,9 @@ orc_parse_log_valist (OrcParser *parser, strcpy (parser->log + parser->log_size, s); parser->log_size += len; parser->error_program = parser->program; +#ifdef HAVE_VASPRINTF + free (s); +#endif } #ifdef HAVE_VASPRINTF
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor