Skip to content

Commit

Permalink
Use TIOCOUTQ on systems where SIOCOUTQ is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowman committed May 28, 2021
1 parent a7a245c commit 391e53f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tools/ipfixsend/ipfixsend.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
#include <stdbool.h>
#include <errno.h>
#include <sys/ioctl.h>
#ifdef __linux__
#include <linux/sockios.h>
#endif
#include <time.h>

#include "siso.h"
Expand Down Expand Up @@ -268,6 +270,9 @@ int main(int argc, char** argv)
// Make sure that all packets are delivered before socket closes
int socket_fd = siso_get_socket(sender);
int not_sent = 0;
#ifndef SIOCOUTQ
#define SIOCOUTQ TIOCOUTQ
#endif
while (!stop && ioctl(socket_fd, SIOCOUTQ, &not_sent) != -1) {
if (not_sent <= 0) {
break;
Expand Down

0 comments on commit 391e53f

Please sign in to comment.