From: Ted Lemon Date: Sat, 6 Dec 1997 04:03:04 +0000 (+0000) Subject: Cast pid_t up to long so that printf will work on systems where it's long and not... X-Git-Tag: V2-BETA-1~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19ea90f71ef63394aebc116463d6e345d40e3575;p=thirdparty%2Fdhcp.git Cast pid_t up to long so that printf will work on systems where it's long and not int. --- diff --git a/client/dhclient.c b/client/dhclient.c index 92f8fdd5a..c30368881 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -56,7 +56,7 @@ #ifndef lint static char copyright[] = -"$Id: dhclient.c,v 1.43 1997/11/20 04:19:21 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.44 1997/12/06 04:02:35 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -2049,7 +2049,7 @@ void write_client_pid_file () if (!pf) warn ("Can't fdopen %s: %m", path_dhclient_pid); else { - fprintf (pf, "%d\n", getpid ()); + fprintf (pf, "%ld\n", (long)getpid ()); fclose (pf); } } diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index 8f0ddba95..a152131a0 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: dhcrelay.c,v 1.8 1997/11/22 07:55:36 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhcrelay.c,v 1.9 1997/12/06 04:03:04 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -205,7 +205,7 @@ int main (argc, argv, envp) warn ("Can't fdopen %s: %m", path_dhcrelay_pid); else { - fprintf (pf, "%d\n", getpid ()); + fprintf (pf, "%ld\n", (long)getpid ()); fclose (pf); } }