[Pkg-gnupg-commit] [libassuan] 06/19: Define INADDR_LOOPBACK if not defined.

Eric Dorland eric at moszumanska.debian.org
Sat Nov 25 07:02:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 87473cd29ca9d5e3fb1c3172126c1122472d8b90
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Sep 6 15:24:10 2017 +0900

    Define INADDR_LOOPBACK if not defined.
    
    * src/assuan-socket.c (INADDR_LOOPBACK): Define.
    
    --
    
    INADDR_LOOPBACK is not defined in some systems.  When defined, its
    byte-order is not clearly defined in any specifications.  So, best
    portable way is not to use the macro INADDR_LOOPBACK at all but use
    0x7f000001 directly.
    
    Nevertheless, for systems which use libassuan, it's host byte-order.
    So, adding the definition works.
    
    GnuPG-bug-id: 2447
    Suggested-by: Peter Dyballa
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
 src/assuan-socket.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/assuan-socket.c b/src/assuan-socket.c
index d7616ce..6131e5b 100644
--- a/src/assuan-socket.c
+++ b/src/assuan-socket.c
@@ -107,6 +107,11 @@
 #endif
 
 
+#ifndef INADDR_LOOPBACK
+# define INADDR_LOOPBACK ((in_addr_t) 0x7f000001) /* 127.0.0.1.  */
+#endif
+
+
 /* The standard SOCKS and TOR port.  */
 #define SOCKS_PORT 1080
 #define TOR_PORT   9050

-- 
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