I'm using a Macbook that's running 10.7, but has been through several OS upgrades, has many versions of Ruby installed, and generally has been hacked to bits and pieces over the last few years while getting software installed.
While attempting to install ncursesw (for sup), I get this error:
ncurses_wrap.c:861:21: error: variable has incomplete type 'struct timezone'
struct timezone tz = {0,0};
^
A search brings up the suggestion we need to #include <sys/time.h>, and indeed, this patch produces a successful compile:
diff --git a/ncurses_wrap.c b/ncurses_wrap.c
index af622c2..db3ac43 100644
--- a/ncurses_wrap.c
+++ b/ncurses_wrap.c
@@ -75,6 +75,8 @@
#include <time.h>
#endif
+#include <sys/time.h>
+
VALUE mNcurses; /* module Ncurses */
VALUE cWINDOW; /* class Ncurses::WINDOW */
VALUE cSCREEN; /* class Ncurses::SCREEN */
However, I don't really have any idea what I'm doing here. In particular, the #include <time.h> above makes me nervous.
I'm using a Macbook that's running 10.7, but has been through several OS upgrades, has many versions of Ruby installed, and generally has been hacked to bits and pieces over the last few years while getting software installed.
While attempting to install
ncursesw
(for sup), I get this error:A search brings up the suggestion we need to
#include <sys/time.h>
, and indeed, this patch produces a successful compile:However, I don't really have any idea what I'm doing here. In particular, the
#include <time.h>
above makes me nervous.