summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-12-04 22:45:03 +0100
committerAndy Wingo <wingo@pobox.com>2011-12-04 22:45:03 +0100
commit6d346bb61a2256515a969e4c4683dfa4a692c426 (patch)
treed0723d310e71032abc7c6d7852f70e8bbbb625ed /module
parent8500b18696f5943049d769631b2abf309c98b3d2 (diff)
ice-9/poll: verify sizeof(struct pollfd)
* libguile/poll.c (scm_init_poll): Define %sizeof-struct-pollfd. * module/ice-9/poll.scm: Check %sizeof-struct-pollfd.
Diffstat (limited to 'module')
-rw-r--r--module/ice-9/poll.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/ice-9/poll.scm b/module/ice-9/poll.scm
index cf61294d7..2ba868748 100644
--- a/module/ice-9/poll.scm
+++ b/module/ice-9/poll.scm
@@ -38,6 +38,9 @@
(load-extension (string-append "libguile-" (effective-version))
"scm_init_poll"))
+(if (not (= %sizeof-struct-pollfd 8))
+ (error "Unexpected struct pollfd size" %sizeof-struct-pollfd))
+
(if (defined? 'POLLIN)
(export POLLIN))