File: 0010-include-for-writev.patch

package info (click to toggle)
tayga 0.9.2-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: ansic: 7,135; sh: 1,234; makefile: 18
file content (24 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net>
Date: Tue, 19 Feb 2019 12:02:21 +0000
Subject: Add missing include for writev

nat64.c:119:6: warning: implicit declaration of function `writev'; did you mean `write'? [-Wimplicit-function-declaration]
  if (writev(gcfg->tun_fd, iov, data_len ? 2 : 1) < 0)
      ^~~~~~
      write
---
 tayga.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tayga.h b/tayga.h
index 2284d2a..c8aadb8 100644
--- a/tayga.h
+++ b/tayga.h
@@ -20,6 +20,7 @@
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
+#include <sys/uio.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <unistd.h>