be more C99 compliant (Florian Weimer)

This commit is contained in:
leitner 2022-12-13 20:02:46 +00:00
parent ffdcdffcc0
commit dbca5e9d5a
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,5 @@
0.34:
be more C99 compliant (Florian Weimer)
0.33:
add byte_start, byte_starts

View File

@ -1,6 +1,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <poll.h>
#include <unistd.h>
int main()
{

View File

@ -62,9 +62,8 @@ int main() {
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
#include <unistd.h>
#if defined(__GLIBC__)
#include <sys/sendfile.h>
#elif defined(__dietlibc__)
#include <fcntl.h>
#if defined(__GLIBC__) || defined(__dietlibc__)
#include <sys/sendfile.h>
#else
#include <linux/unistd.h>
@ -77,7 +76,7 @@ int main() {
off_t o=0;
off_t r=sendfile(1,fd,&o,23);
if (r!=-1)
printf("sent %llu bytes.\n",r);
printf("sent %lld bytes.\n",(long long int)r);
return 0;
}