dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dmidecode] dmidecode 2.8 to be released soon


From: Jean Delvare
Subject: Re: [dmidecode] dmidecode 2.8 to be released soon
Date: Sun, 22 Jan 2006 11:03:42 +0100

Hi Petter,

[Jean Delvare]
> > I plan to release version 2.8 within the next two weeks. I would
> > welcome any tester of the current CVS version. Please report if
> > anything doesn't look right, be it a compilation or runtime issue.

[Petter Reinholdtsen]
> I get this when I try to build:
> 
> In file included from vpdopt.c:28:
> vpdopt.h:25: error: syntax error before 'off_t'
> vpdopt.h:25: warning: no semicolon at end of struct or union
> vpdopt.h:27: error: syntax error before '}' token
> vpdopt.h:27: warning: ISO C does not allow extra ';' outside of a function
> vpdopt.c:42: error: array type has incomplete element type
> vpdopt.c: In function 'print_opt_string_list':
> vpdopt.c:55: error: invalid application of 'sizeof' to incomplete type 
> 'struct string_keyword'
> vpdopt.c: In function 'parse_opt_string':
> vpdopt.c:71: error: invalid application of 'sizeof' to incomplete type 
> 'struct string_keyword'
> make[1]: *** [vpdopt.o] Error 1
> make[1]: Leaving directory `/home/pere/src/perecvs/src/dmidecode-upstream'
> 
> This patch fixes it by making sure the off_t type is known at that
> location of the code.

I had a similar report yesterday just after sending this message to the
list. I came to the same conclusions, and actually CVS is supposedly
already fixed.

> Index: vpdopt.h
> ===================================================================
> RCS file: /sources/dmidecode/dmidecode/vpdopt.h,v
> retrieving revision 1.2
> diff -u -3 -p -u -r1.2 vpdopt.h
> --- vpdopt.h    3 Oct 2005 20:06:26 -0000       1.2
> +++ vpdopt.h    21 Jan 2006 23:40:32 -0000
> @@ -19,6 +19,9 @@
>   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
>   */
> 
> +#include <sys/types.h>
> +#include <unistd.h>
> +
>  struct string_keyword
>  {
>         const char *keyword;

However, I only included <sys/types.h>. Including <unistd.h> alone did
not seem to help the reporter, while <sys/types.h> alone did. Did you
need both? Or is including both the standard way to make sure off_t
will be defined on every system out there? If so I'll add <unistd.h>
too.

Now, why none of my four systems, which cover three different
distributions, two different libc, three different gcc and two
different architectures, needed any include at this point is still a
mystery to me.

Thanks a lot for your tests and report, this is much appreciated.

-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]