diff options
author | NIIBE Yutaka <[email protected]> | 2017-09-06 06:24:10 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2017-09-06 06:24:10 +0000 |
commit | 87473cd29ca9d5e3fb1c3172126c1122472d8b90 (patch) | |
tree | efc719ebfd029f6bb990a7246a75e36c1decc5f4 | |
parent | configure: Add flag to disable documentation build. (diff) | |
download | libassuan-87473cd29ca9d5e3fb1c3172126c1122472d8b90.tar.gz libassuan-87473cd29ca9d5e3fb1c3172126c1122472d8b90.zip |
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 <[email protected]>
-rw-r--r-- | src/assuan-socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 |