summaryrefslogtreecommitdiff
blob: 06546c6bd815f6047201782118df08b61219288e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--- a/lfd_encrypt.c
+++ b/lfd_encrypt.c
@@ -44,6 +44,7 @@
 #include <strings.h>
 #include <string.h>
 #include <time.h>
+#include <arpa/inet.h> /* htonl() */
 
 #include "vtun.h"
 #include "linkfd.h"
--- a/lib.c
+++ b/lib.c
@@ -34,6 +34,7 @@
 #include <sys/wait.h>
 #include <syslog.h>
 #include <errno.h>
+#include <time.h> /* nanosleep() */
 
 #include "vtun.h"
 #include "linkfd.h"
--- a/lib.h
+++ b/lib.h
@@ -26,6 +26,8 @@
 #include <sys/types.h>
 #include <signal.h>
 #include <errno.h>
+#include <unistd.h> /* read(), write() */
+#include <bsd/unistd.h> /* setproctitle(), see man libbsd(7) */
 
 #ifdef HAVE_LIBUTIL_H
 #include <libutil.h>
@@ -35,7 +37,7 @@
   void init_title(int argc,char *argv[],char *env[], char *name);
   void set_title(const char *ftm, ...);
 #else
-  #define init_title( a... ) 
+  #define init_title(argc, argv, env, name) setproctitle_init(argc, argv, env)
   #define set_title setproctitle
 #endif /* HAVE_SETPROC_TITLE */
 
--- a/lock.c
+++ b/lock.c
@@ -32,6 +32,7 @@
 #include <sys/types.h>
 #include <signal.h>
 #include <errno.h>
+#include <time.h> /* nanosleep() */
 
 #include "vtun.h"
 #include "linkfd.h"
--- a/lfd_shaper.c
+++ b/lfd_shaper.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include <syslog.h>
+#include <time.h> /* nanosleep() */
 
 #include "vtun.h"
 #include "linkfd.h"
--- a/generic/pty_dev.c
+++ b/generic/pty_dev.c
@@ -22,6 +22,8 @@
 
 #include "config.h"
 
+#define _GNU_SOURCE // getpt, grantpt 
+#define _XOPEN_SOURCE // unlockpt
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>