Problem with have_struct_member

D

Daniel Berger

Hi all,

Ruby 1.8.2
Solaris 9

For some reason this is returning false:

have_struct_member("struct lastlog", "ll_time", "lastlog.h")

Yet, there is a lastlog.h in /usr/include and the lastlog struct is
defined as follows:

struct lastlog {
#ifdef _LP64
time32_t ll_time;
#else
time_t ll_time;
#endif
char ll_line[8];
char ll_host[16]; /* same as in utmp */
};

I made sure that it could actually see the lastlog.h file by calling
'have_header("lastlog.h")' which returned true.

I also did a sanity check by trying a different struct and struct
member:

have_struct_member("struct passwd", "pw_gecos", "pwd.h")

This returned true as well.

What am I doing wrong?

Regards,

Dan
 
T

ts

Try it with

D> have_struct_member("struct lastlog", "ll_time", "lastlog.h")

have_struct_member("struct lastlog", "ll_time", ["time.h", "lastlog.h"])

D> struct lastlog {
D> #ifdef _LP64
D> time32_t ll_time;
D> #else
D> time_t ll_time;
^^^^^^

here the problem

D> #endif
D> char ll_line[8];
D> char ll_host[16]; /* same as in utmp */
D> };



Guy Decoux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,462
Latest member
ChanaLipsc

Latest Threads

Top