[Pkg-gnupg-commit] [libassuan] 119/437: * assuan-socket-connect.c: Define SUN_LEN, AF_LOCAL and PF_LOCAL if they are not available. * assuan-domain-connect.c: Define PF_LOCAL and AF_LOCAL if needed.
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit 858ce96e9707883b28c65db4c0a2beae6cf169e2
Author: Werner Koch <wk at gnupg.org>
Date: Sat Oct 2 05:40:51 2004 +0000
* assuan-socket-connect.c: Define SUN_LEN, AF_LOCAL and PF_LOCAL
if they are not available.
* assuan-domain-connect.c: Define PF_LOCAL and AF_LOCAL if needed.
---
src/ChangeLog | 6 ++++++
src/assuan-domain-connect.c | 13 ++++++++++++-
src/assuan-socket-connect.c | 22 +++++++++++++++++++++-
3 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index f5fd6a9..32bd328 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-02 Werner Koch <wk at g10code.com>
+
+ * assuan-socket-connect.c: Define SUN_LEN, AF_LOCAL and PF_LOCAL
+ if they are not available.
+ * assuan-domain-connect.c: Define PF_LOCAL and AF_LOCAL if needed.
+
2004-06-23 Marcus Brinkmann <marcus at g10code.de>
* assuan-domain-connect.c [HAVE_SYS_UIO_H]: Include <sys/uio.h>.
diff --git a/src/assuan-domain-connect.c b/src/assuan-domain-connect.c
index b92be3b..72d7e59 100644
--- a/src/assuan-domain-connect.c
+++ b/src/assuan-domain-connect.c
@@ -39,6 +39,17 @@
#include "assuan-defs.h"
+#ifndef PF_LOCAL
+# ifdef PF_UNIX
+# define PF_LOCAL PF_UNIX
+# else
+# define PF_LOCAL AF_UNIX
+# endif
+# ifndef AF_LOCAL
+# define AF_LOCAL AF_UNIX
+# endif
+#endif
+
#define LOG(format, args...) \
fprintf (assuan_get_assuan_log_stream (), \
assuan_get_assuan_log_prefix (), \
@@ -384,7 +395,7 @@ _assuan_domain_init (ASSUAN_CONTEXT *r_ctx, int rendezvousfd, pid_t peer)
if (! p)
{
LOG ("cannot determine an appropriate temporary file "
- "name. DOS in progress?\n");
+ "name. DoS in progress?\n");
_assuan_release_context (ctx);
close (fd);
return ASSUAN_General_Error;
diff --git a/src/assuan-socket-connect.c b/src/assuan-socket-connect.c
index b2e98d4..af00bcc 100644
--- a/src/assuan-socket-connect.c
+++ b/src/assuan-socket-connect.c
@@ -1,5 +1,5 @@
/* assuan-socket-connect.c - Assuan socket based client
- * Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ * Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
*
* This file is part of Assuan.
*
@@ -31,6 +31,26 @@
#include "assuan-defs.h"
+/* Hacks for Slowaris. */
+#ifndef PF_LOCAL
+# ifdef PF_UNIX
+# define PF_LOCAL PF_UNIX
+# else
+# define PF_LOCAL AF_UNIX
+# endif
+#endif
+#ifndef AF_LOCAL
+# define AF_LOCAL AF_UNIX
+#endif
+
+#ifndef SUN_LEN
+# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
+
+
+
+
#define LOG(format, args...) \
fprintf (assuan_get_assuan_log_stream (), \
assuan_get_assuan_log_prefix (), \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list