Check for missing ftruncate prototype.

From github PR#301 in conjunction with rsbeckerca.
This commit is contained in:
Darren Tucker 2022-03-09 09:29:30 +11:00
parent 8cf5275452
commit c41c84b439
2 changed files with 10 additions and 0 deletions

View File

@ -2092,6 +2092,12 @@ AC_CHECK_DECLS([O_NONBLOCK], , ,
#endif
])
AC_CHECK_DECLS([ftruncate], , ,
[
#include <sys/types.h>
#include <unistd.h>
])
AC_CHECK_DECLS([readv, writev], , , [
#include <sys/types.h>
#include <sys/uio.h>

View File

@ -65,6 +65,10 @@ int bindresvport_sa(int sd, struct sockaddr *sa);
void closefrom(int);
#endif
#if defined(HAVE_DECL_FTRUNCATE) && HAVE_DECL_FTRUNCATE == 0
int ftruncate(int filedes, off_t length);
#endif
#ifndef HAVE_GETLINE
#include <stdio.h>
ssize_t getline(char **, size_t *, FILE *);