Add missing include. Fix getline conflict.

This commit is contained in:
joerg 2011-09-25 19:53:55 +00:00
parent 1965b70fa3
commit 071aabd39f
3 changed files with 54 additions and 1 deletions

View file

@ -1,7 +1,9 @@
$NetBSD: distinfo,v 1.3 2005/02/24 12:13:45 agc Exp $
$NetBSD: distinfo,v 1.4 2011/09/25 19:53:55 joerg Exp $
SHA1 (dynip_3.00.tar.gz) = d1acee591e3ff51444f7dcbd7250c52a92a2d5f2
RMD160 (dynip_3.00.tar.gz) = b01af33171c8296bb13f6e31bec25e723d2f7272
Size (dynip_3.00.tar.gz) = 22443 bytes
SHA1 (patch-aa) = ff1a5be64b46675f331b73415acdb04abc62936b
SHA1 (patch-ab) = d17b71dababab0149322e6954757eb3e46d9383c
SHA1 (patch-dynipclient.c) = 7bd1605d5f3f81f9a6a2d07217271e4d2cb0474d
SHA1 (patch-prof.c) = c8b6bd26650856d13573e3ff3c487c27f3e1b705

View file

@ -0,0 +1,11 @@
$NetBSD: patch-dynipclient.c,v 1.1 2011/09/25 19:53:55 joerg Exp $
--- dynipclient.c.orig 2011-09-25 09:35:33.000000000 +0000
+++ dynipclient.c
@@ -51,4 +51,6 @@
*/
+#include <stdlib.h>
+
#include "dynipgbl.h"
#include "dynipclient.h"

View file

@ -0,0 +1,40 @@
$NetBSD: patch-prof.c,v 1.1 2011/09/25 19:53:55 joerg Exp $
--- prof.c.orig 2011-09-25 09:35:54.000000000 +0000
+++ prof.c
@@ -65,7 +65,7 @@ static u_int profInitFlag;
/* local (internal) functions */
static u_short copyfile(FILE *, FILE *, u_int);
static u_short findOffset(FILE *, char *, u_short *);
-static u_short getline(FILE *, char *, u_short, u_short);
+static u_short my_getline(FILE *, char *, u_short, u_short);
static u_short strcpymax(char *, char *, u_short);
u_int profGetLine(u_short lineno, char *pLine, u_short maxline, char *pFile)
@@ -89,7 +89,7 @@ if ((fp = fopen(pFile, "r")) == NULL)
ret = 0;
while (lineno--)
- ret = (u_int)getline(fp, pLine, maxline, PROF_TYPE_PLAIN);
+ ret = (u_int)my_getline(fp, pLine, maxline, PROF_TYPE_PLAIN);
fclose(fp);
@@ -169,7 +169,7 @@ if ((fp = fopen(pFile,"r")) == NULL)
cnt = 1;
while (cnt != 0)
- if ((cnt = getline(fp, achLine, sizeof(achLine),PROF_TYPE_CONF)) != 0)
+ if ((cnt = my_getline(fp, achLine, sizeof(achLine),PROF_TYPE_CONF)) != 0)
{
ptr = strtok(achLine, "=");
@@ -372,7 +372,7 @@ pDest[len] = '\0';
return (len);
}
-static u_short getline(FILE *fp, char *pBuffer, u_short usBuflen, u_short type)
+static u_short my_getline(FILE *fp, char *pBuffer, u_short usBuflen, u_short type)
{
int ch;
u_short cnt;