be more C99 compliant (Florian Weimer)
This commit is contained in:
parent
ffdcdffcc0
commit
dbca5e9d5a
1
CHANGES
1
CHANGES
@ -1,4 +1,5 @@
|
|||||||
0.34:
|
0.34:
|
||||||
|
be more C99 compliant (Florian Weimer)
|
||||||
|
|
||||||
0.33:
|
0.33:
|
||||||
add byte_start, byte_starts
|
add byte_start, byte_starts
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
@ -62,9 +62,8 @@ int main() {
|
|||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if defined(__GLIBC__)
|
#include <fcntl.h>
|
||||||
#include <sys/sendfile.h>
|
#if defined(__GLIBC__) || defined(__dietlibc__)
|
||||||
#elif defined(__dietlibc__)
|
|
||||||
#include <sys/sendfile.h>
|
#include <sys/sendfile.h>
|
||||||
#else
|
#else
|
||||||
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
||||||
@ -77,7 +76,7 @@ int main() {
|
|||||||
off_t o=0;
|
off_t o=0;
|
||||||
off_t r=sendfile(1,fd,&o,23);
|
off_t r=sendfile(1,fd,&o,23);
|
||||||
if (r!=-1)
|
if (r!=-1)
|
||||||
printf("sent %llu bytes.\n",r);
|
printf("sent %lld bytes.\n",(long long int)r);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user