fix compilation errors
This commit is contained in:
parent
8a202ebc6d
commit
0c1b1f0b31
1 changed files with 3 additions and 5 deletions
|
@ -1,13 +1,11 @@
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include <hexagram/pcapng.h>
|
||||||
|
|
||||||
ssize_t hexagram_pcapng_stream_read(fd, handler, error)
|
ssize_t hexagram_pcapng_stream_read(fd, handler, error)
|
||||||
int fd;
|
int fd;
|
||||||
hexagram_pcapng_block_handler *handler;
|
hexagram_pcapng_block_handler *handler;
|
||||||
|
@ -20,7 +18,6 @@ ssize_t hexagram_pcapng_stream_read(fd, handler, error)
|
||||||
while (1) {
|
while (1) {
|
||||||
ssize_t readlen;
|
ssize_t readlen;
|
||||||
size_t bodylen;
|
size_t bodylen;
|
||||||
off_t seeklen;
|
|
||||||
|
|
||||||
if ((readlen = read(fd, &header, sizeof(header))) < 0) {
|
if ((readlen = read(fd, &header, sizeof(header))) < 0) {
|
||||||
*error = HEXAGRAM_PCAPNG_ERROR_IO;
|
*error = HEXAGRAM_PCAPNG_ERROR_IO;
|
||||||
|
@ -58,6 +55,7 @@ ssize_t hexagram_pcapng_stream_read(fd, handler, error)
|
||||||
|
|
||||||
*error = HEXAGRAM_PCAPNG_ERROR_OK;
|
*error = HEXAGRAM_PCAPNG_ERROR_OK;
|
||||||
|
|
||||||
|
done:
|
||||||
return total;
|
return total;
|
||||||
|
|
||||||
error_io:
|
error_io:
|
||||||
|
|
Loading…
Add table
Reference in a new issue