Skip to content

Commit

Permalink
- Make it buildable in FreeBSD-12.
Browse files Browse the repository at this point in the history
  • Loading branch information
araujobsd committed Jun 9, 2017
1 parent 44fc0a0 commit 9e2eacf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions include/ndmpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <sys/socket.h>
#include <string.h> /* memset */
#include <unistd.h> /* close */
#include <stdio.h>

/* free() */
#include <stdlib.h>
Expand Down Expand Up @@ -318,5 +319,6 @@ int ndmp_run(u_long port, ndmp_con_handler_func_t con_handler_func);
void connection_handler(ndmp_connection_t *connection);
bool_t file_exists(const char * filename);
int startNDMPD(void);
static char * getline_ndmpd(FILE *fp, char *line, int llen);

#endif /* _NDMPD_H_ */
6 changes: 3 additions & 3 deletions src/ndmpd_dtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ ddates_pathname(char *buf)
}

/*
* getline
* getline_ndmpd
*
* Get a line from the file and handle the continued lines.
*/
static char *
getline(FILE *fp, char *line, int llen)
getline_ndmpd(FILE *fp, char *line, int llen)
{
char *save;
int len;
Expand Down Expand Up @@ -563,7 +563,7 @@ getrecord(FILE *fp, dumpdates_t *ddatep, int *recno)
return (-1);

do {
if (getline(fp, tbuf, sizeof (tbuf)) != tbuf)
if (getline_ndmpd(fp, tbuf, sizeof (tbuf)) != tbuf)
return (-1);
} while (!*tbuf);

Expand Down

0 comments on commit 9e2eacf

Please sign in to comment.