From 4857c737d3ff7621788d3bde23b1ce7c283d2a80 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 22 Jan 2010 16:55:05 -0600 Subject: [PATCH 1/2] Fix getgrent call in unix.groups --- basis/unix/groups/groups.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/unix/groups/groups.factor b/basis/unix/groups/groups.factor index a9b80002a8..7c2da50c9e 100644 --- a/basis/unix/groups/groups.factor +++ b/basis/unix/groups/groups.factor @@ -83,7 +83,7 @@ M: integer user-groups ( id -- seq ) user-name (user-groups) ; : all-groups ( -- seq ) - [ [ unix.ffi:getgrent ] unix-system-call dup ] [ \ unix.ffi:group memory>struct group-struct>group ] produce nip ; + [ unix.ffi:getgrent dup ] [ \ unix.ffi:group memory>struct group-struct>group ] produce nip ; : ( -- assoc ) all-groups [ [ id>> ] keep ] H{ } map>assoc ; From 2bf53dde61da5aebd1480d3032b3d32e0f9031ac Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 22 Jan 2010 17:10:32 -0600 Subject: [PATCH 2/2] Fix netbsd load error --- basis/unix/ffi/bsd/netbsd/netbsd.factor | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/basis/unix/ffi/bsd/netbsd/netbsd.factor b/basis/unix/ffi/bsd/netbsd/netbsd.factor index e519652421..d755caf874 100644 --- a/basis/unix/ffi/bsd/netbsd/netbsd.factor +++ b/basis/unix/ffi/bsd/netbsd/netbsd.factor @@ -1,5 +1,5 @@ USING: alien.syntax alien.c-types math vocabs.loader -classes.struct unix.types ; +classes.struct unix.types unix.time ; IN: unix.ffi CONSTANT: FD_SETSIZE 256 @@ -127,6 +127,8 @@ CONSTANT: _UTX_LINESIZE 32 CONSTANT: _UTX_IDSIZE 4 CONSTANT: _UTX_HOSTSIZE 256 +<< + CONSTANT: _SS_MAXSIZE 128 : _SS_ALIGNSIZE ( -- n ) @@ -138,6 +140,8 @@ CONSTANT: _SS_MAXSIZE 128 : _SS_PAD2SIZE ( -- n ) _SS_MAXSIZE 2 - _SS_PAD1SIZE - _SS_ALIGNSIZE - ; inline +>> + STRUCT: sockaddr_storage { ss_len __uint8_t } { ss_family sa_family_t }