| use TIOCOUTQ instead of SIOCOUTQ - geomyidae - A small C-based gopherd. | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit d8bbf95b6651b772f9701efdd75669cd1dda0266 | |
| parent e1ad0cf0b73a9ed594dfcb040044627b1e358e60 | |
| Author: Hiltjo Posthuma <[email protected]> | |
| Date: Wed, 7 Feb 2018 21:02:31 +0100 | |
| use TIOCOUTQ instead of SIOCOUTQ | |
| This is defined to the same thing on Linux, but the other name is supported | |
| on more platforms. This also saves a platform-specific include. | |
| Signed-off-by: Christoph Lohmann <[email protected]> | |
| Diffstat: | |
| M ind.c | 7 +++---- | |
| M main.c | 1 - | |
| 2 files changed, 3 insertions(+), 5 deletions(-) | |
| --- | |
| diff --git a/ind.c b/ind.c | |
| @@ -18,10 +18,9 @@ | |
| #include <arpa/inet.h> | |
| #include <sys/ioctl.h> | |
| -/* for sendfile(2) and SIOCOUTQ */ | |
| +/* for sendfile(2) */ | |
| #ifdef __linux__ | |
| #include <sys/sendfile.h> | |
| -#include <linux/sockios.h> | |
| #elif defined(__FreeBSD__) || defined(__DragonFly__) | |
| #include <sys/types.h> | |
| #include <sys/uio.h> | |
| @@ -61,8 +60,8 @@ pendingbytes(int sock) | |
| int pending; | |
| pending = 0; | |
| -#ifdef SIOCOUTQ | |
| - ioctl(sock, SIOCOUTQ, &pending); | |
| +#ifdef TIOCOUTQ | |
| + ioctl(sock, TIOCOUTQ, &pending); | |
| #endif | |
| return pending; | |
| diff --git a/main.c b/main.c | |
| @@ -15,7 +15,6 @@ | |
| #include <sys/stat.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| -#include <sys/ioctl.h> | |
| #include <signal.h> | |
| #include <string.h> | |
| #include <strings.h> |