Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12: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-0.4.21/orc/orcparse.c =================================================================== --- orc-0.4.21.orig/orc/orcparse.c +++ orc-0.4.21/orc/orcparse.c @@ -378,7 +378,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) { @@ -389,6 +398,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 Index: orc-0.4.21/configure.ac =================================================================== --- orc-0.4.21.orig/configure.ac +++ orc-0.4.21/configure.ac @@ -65,6 +65,7 @@ AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([unistd.h]) AC_CHECK_FUNCS([gettimeofday]) +AC_CHECK_FUNCS([vasprintf]) AC_CHECK_FUNCS([sigaction]) AC_CHECK_FUNCS([sigsetjmp])
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