diff options
author | Werner Koch <[email protected]> | 2004-10-02 05:40:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-10-02 05:40:51 +0000 |
commit | 858ce96e9707883b28c65db4c0a2beae6cf169e2 (patch) | |
tree | 8c0041789b2f36f9e6d9748df7fea2908dc7edd5 | |
parent | . (diff) | |
download | libassuan-858ce96e9707883b28c65db4c0a2beae6cf169e2.tar.gz libassuan-858ce96e9707883b28c65db4c0a2beae6cf169e2.zip |
* 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.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/assuan-domain-connect.c | 13 | ||||
-rw-r--r-- | 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 <[email protected]> + + * 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 <[email protected]> * 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 (), \ |