summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-17 07:11:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-17 07:11:22 +0000
commit96b40dff450df701200ea5edceb07f2ed847e3fd (patch)
treea2c90999001ebcb8fd2fd67ffb3d5911a8e98f81 /ext/socket
parent7dd3853eac98396d3b5abee16d7f680d941eae82 (diff)
2000-02-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/getaddrinfo.c2
-rw-r--r--ext/socket/getnameinfo.c2
-rw-r--r--ext/socket/socket.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index d99ad12..0b9d9b6 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -38,6 +38,7 @@
* - PF_UNSPEC case would be handled in getipnodebyname() with the AI_ALL flag.
*/
+#include "config.h"
#include <sys/types.h>
#ifndef NT
#include <sys/param.h>
@@ -66,7 +67,6 @@
#include <socks.h>
#endif
-#include "config.h"
#include "addrinfo.h"
#include "sockport.h"
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 2fbb8d8..60bd71b 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -34,6 +34,7 @@
* but INRIA implementation returns EAI_xxx defined for getaddrinfo().
*/
+#include "config.h"
#include <sys/types.h>
#ifndef NT
#include <sys/socket.h>
@@ -60,7 +61,6 @@
#include <socks.h>
#endif
-#include "config.h"
#include "addrinfo.h"
#include "sockport.h"
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 0a61160..e7d2300 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -86,7 +86,7 @@ int Rconnect();
* RFC 2553: protocol-independent placeholder for socket addresses
*/
#define _SS_MAXSIZE 128
-#define _SS_ALIGNSIZE (sizeof(long long))
+#define _SS_ALIGNSIZE (sizeof(double))
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \
_SS_PAD1SIZE - _SS_ALIGNSIZE)
@@ -99,7 +99,7 @@ struct sockaddr_storage {
unsigned short ss_family;
#endif
char __ss_pad1[_SS_PAD1SIZE];
- long long __ss_align; /* force desired structure storage alignment */
+ double __ss_align; /* force desired structure storage alignment */
char __ss_pad2[_SS_PAD2SIZE];
};
#endif