From fce205c378e683c31829724103b993c638a93f37 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sat, 20 May 2017 15:25:00 -0700 Subject: [PATCH] Fix warning for %d used for long integer, and missing string.h include --- src/unixfork.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/unixfork.c b/src/unixfork.c index 02b30ee..0b98799 100755 --- a/src/unixfork.c +++ b/src/unixfork.c @@ -26,6 +26,7 @@ static char *id = "$Id: unixfork.c,v 1.6 2001/12/26 22:17:05 sybalsky Exp $ Copy #include "version.h" #include +#include #ifdef OS4 #define USETERMIOS @@ -239,7 +240,7 @@ fork_Unix() putenv(tempstring); tempstring = (char *)malloc(30); - sprintf(tempstring, "LDESTARTTIME=%d", StartTime); + sprintf(tempstring, "LDESTARTTIME=%ld", StartTime); putenv(tempstring); tempstring = (char *)malloc(30); @@ -356,7 +357,7 @@ fork_Unix() char PipeName[40]; sock = socket(AF_UNIX, SOCK_STREAM, 0); if (sock < 0) {perror("slave socket"); exit(0);} - sprintf(PipeName, "/tmp/LPU%d-%d", StartTime, slot); + sprintf(PipeName, "/tmp/LPU%ld-%d", StartTime, slot); addr.sun_family = AF_UNIX; strcpy(addr.sun_path, PipeName); status = connect(sock, (struct sockaddr *)&addr,