about summary refs log tree commit diff
path: root/src/daemontools-extras
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2024-07-16 22:15:50 +0000
committerLaurent Bercot <ska@appnovation.com>2024-07-16 22:15:50 +0000
commit1777259f308db7c48ac3ad24cd410007881e6fc8 (patch)
tree1b889b744bf783da277950fc72ef4e060cddfe31 /src/daemontools-extras
parent91b376e92ab5210a7ddfe7d1567552cc0a6de7f8 (diff)
downloads6-1777259f308db7c48ac3ad24cd410007881e6fc8.tar.gz
s6-1777259f308db7c48ac3ad24cd410007881e6fc8.tar.xz
s6-1777259f308db7c48ac3ad24cd410007881e6fc8.zip
Fix Solaris 10 build
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/daemontools-extras')
-rw-r--r--src/daemontools-extras/lolsyslog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/daemontools-extras/lolsyslog.c b/src/daemontools-extras/lolsyslog.c
index e62bdef..0ade2f3 100644
--- a/src/daemontools-extras/lolsyslog.c
+++ b/src/daemontools-extras/lolsyslog.c
@@ -75,17 +75,20 @@ size_t lolsyslog_string (char *out, char const *in)
   unsigned int fpr ;
   int fp ;
   CODE const *p = facilitynames ;
+  char const *x ;
 
   if (in[0] != '<' || !(i = uint_scan(in+1, &fpr)) || in[1+i] != '>') return 0 ;
   fp = LOG_FAC(fpr) << 3 ;
   for (; p->c_name ; p++) if (p->c_val == fp) break ;
-  out = stpcpy(out, p->c_name ? p->c_name : "unknown") ;
+  x = p->c_name ? p->c_name : "unknown" ;
+  strcpy(out, x) ; out += strlen(x) ;
   *out++ = '.' ;
 
   p = prioritynames ;
   fp = LOG_PRI(fpr) ;
   for (; p->c_name ; p++) if (p->c_val == fp) break ;
-  out = stpcpy(out, p->c_name ? p->c_name : "unknown") ;
+  x = p->c_name ? p->c_name : "unknown" ;
+  strcpy(out, x) ; out += strlen(x) ;
   *out++ = ':' ; *out++ = ' ' ; *out++ = 0 ;
   return i+2 ;
 }