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
|
$NetBSD: patch-aj,v 1.5 2004/03/28 22:00:05 minskim Exp $
--- src/Listener.c++.orig 2003-01-19 18:37:29.000000000 -0600
+++ src/Listener.c++
@@ -22,6 +22,8 @@
#include "Listener.h"
+#include <stdio.h>
+#include <stdlib.h>
#include <assert.h>
#include <fcntl.h>
#include <sys/types.h>
@@ -32,6 +34,7 @@
#include <rpc/clnt.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <sys/param.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h>
@@ -209,7 +212,7 @@ Listener::create_local_client(TCP_Client
#endif
char *tmpfile = tempnam("/tmp", ".fam");
-#ifdef HAVE_SOCKADDR_SUN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
#else
sockaddr_un sun = { AF_UNIX, "" };
@@ -283,7 +286,7 @@ Listener::accept_localclient(int ofd, vo
// Get the new socket.
-#ifdef HAVE_SOCKADDR_SUN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
#else
struct sockaddr_un sun = { AF_UNIX, "" };
@@ -349,7 +352,7 @@ Listener::accept_localclient(int ofd, vo
void
Listener::dirty_ugly_hack()
{
-#ifdef HAVE_SOCKADDR_SUN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
#else
static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
|